Barry Warsaw [Wed, 21 Jan 1998 05:14:24 +0000 (05:14 +0000)]
(py-mode-map): Add a binding of C-m to py-newline-and-indent. This is
a religious issue: RMS decrees that the Enter (RET) key should just do
a newline and a LFD (C-j) should do a newline and indent (i.e. the
python-mode version of this). Almost everyone I know disagrees and
finds that RET should do newline and indent. Almost everyone hacks
their modes to do this, if they know how. Because it's hard for
newbies to figure out how to do this, and because most DOS keyboards
lack a LFD (leaving users to the more obscure C-j), I think it makes
better sense to add this default binding.
Fred Drake [Wed, 21 Jan 1998 04:58:10 +0000 (04:58 +0000)]
Simple documentation of the copy_reg module.
Guido, you should probably look at this. The pickle documentation is out of
date; I don't see anything about the __reduce__() stuff or the
__safe_for_unpickling__ attribute.
Barry Warsaw [Tue, 20 Jan 1998 22:52:56 +0000 (22:52 +0000)]
(py-compute-indentation): In the most common case, where indentation
is based on the line above, watch out for landing inside a triple
quoted string. In this case, use iterative search +
parse-partial-sexp backwards to find the beginning of the string.
Note this does affect performance, but very little in the common cases
(I hope). It could be made *much* faster by adding Emacs and XEmacs
dependent code -- different code naturally. :-(
Fixes the following reported bug:
if len(sys.argv) >= 6:
# More lines here
fptr = open('/etc/hosts', 'w')
fptr.write("""# /etc/hosts -- autocreated by /etc/ppp/ip-up
#
# Address from pppd
%-15s %s
Barry Warsaw [Tue, 20 Jan 1998 21:43:34 +0000 (21:43 +0000)]
(py-master-file): New buffer-local variable which can be set in the
file local variable section of a file. When set, and the user hits
C-c C-c, this file gets executed instead of the buffer's file. Idea
given by Roy Dragseth <royd@math.uit.no>, but implemented differently.
(py-execute-buffer): Support py-master-file variable. If this names a
relative path, default-directory is prepended via expand-file-name.
Fred Drake [Tue, 20 Jan 1998 05:26:12 +0000 (05:26 +0000)]
Added index entry and \label{} for exceptions module. This isn't in the
normal modules portion of the manual, but that's the basic effect of this
section with the 1.5 change in exception support.
Fred Drake [Tue, 20 Jan 1998 05:07:19 +0000 (05:07 +0000)]
Proposed new macros: see comments. These are not yet used.
These are intended to support semantic markup. There are a number
of places in the documentation where the exact meaning of an
indentifier marked \code{} in the running text is ambiguous (could
be a module or a class, a function or a method, etc.). These are
intended to clarify the intent of the identifier for processing
applications and more intelligent style processing.
Guido van Rossum [Mon, 19 Jan 1998 22:06:22 +0000 (22:06 +0000)]
Instead of a single exists(), differentiate between files, modules,
executable files, and directories. When expecting a module, we also
look for the .pyc or .pyo file.
Guido van Rossum [Mon, 19 Jan 1998 22:03:52 +0000 (22:03 +0000)]
Better #ifdefs for NetBSD, taking into account that at least on netBSD
1.3, dlopen() etc. are fully implemented, including dlerror().
From Jaromir Dolecek and Ty Sarna.
Guido van Rossum [Mon, 19 Jan 1998 21:58:26 +0000 (21:58 +0000)]
Rewritten PyImport_Cleanup() and its helper, clear_carefully(). They
now implement the following finalization strategy.
1. Whenever this code deletes a module, its directory is cleared
carefully, as follows:
- set all names to None that begin with exactly one underscore
- set all names to None that don't begin with two underscores
- clear the directory
2. Modules are deleted in the following order:
- modules with a reference count of 1, except __builtin__ or __sys__
- repeat until no more are found with a reference count of 1
- __main__ if it's still there
- all remaining modules except __builtin__ or sys
- sys
_ __builtin__
Fred Drake [Sun, 18 Jan 1998 05:09:54 +0000 (05:09 +0000)]
\funcitem{}, \dataitem{}, \excitem{}: Removed obsolete macros; there are no
longer used anywhere. Use the {*desc} environments instead.
\var{}: Ensure that the argument is always set in roman italic, in case an
alternate font is being used for code. These keeps the result of
\var{} consistent.
Some minor changes to allow easier exploration of alternate fonts for code in
the running text. Haven't changed the selected font; I haven't found one that
has everything required! (The best non-monospaced font so far was missing
the <, >, and | characters, or at least had them at the wrong locations. It
also allowed confusion between upper-case I and lower-case L.)
Jack Jansen [Fri, 16 Jan 1998 14:40:10 +0000 (14:40 +0000)]
Mods by Bill Bedford
- Use internal version of finder class so we don't drag in finder
tools
- error -1704 also ignored during arg unpack
- Use Scriptable Text Editor for example
Fred Drake [Tue, 13 Jan 1998 17:18:57 +0000 (17:18 +0000)]
Removed tarps2, tardvi targets based on comments from Guido.
Added -9 option to gzip. This doesn't save much space, but it's "free" and
appreaciated by those with slow modems. (With these tarballs, that means
"those with modems"...!)
Fred Drake [Tue, 13 Jan 1998 04:03:02 +0000 (04:03 +0000)]
Override several functions from the stock latex2html to support the module
index. It works, it's ugly, and would probably have to be completely redone
if we changed latex2html versions. See the comments. ;-(
Fred Drake [Mon, 12 Jan 1998 23:15:29 +0000 (23:15 +0000)]
Added support for \funcline{} and \dataline{}.
For all generated cases of <strong>...</strong> (from this module), change to
<b>...</b>. This, from me? This is entirely to reduce the size of the
generated markup, which is more of an issue than semantics here. Since
<strong> isn't very meaningful anyway, this should be good.
Fred Drake [Mon, 12 Jan 1998 14:44:33 +0000 (14:44 +0000)]
\optional{}: Removed leading word space, allowing more flexibility.
{seealso} environment: Always start a new paragraph after the "See Also:"
line; this ensures that formatting is consistent for each subsequent
\see*{} item.
Fred Drake [Sun, 11 Jan 1998 21:15:23 +0000 (21:15 +0000)]
Follow current recommended practice in an example: Use isinstance() to
perform a type test instead of type(x) == types.FoobarType. In example
for type().
Fred Drake [Fri, 9 Jan 1998 22:36:51 +0000 (22:36 +0000)]
Add module reference for cPickle to index.
Consistency: Always use trailing "()" for function and method names in text.
Consistency: Always mark parameter names with \var{} in text.
Change questionable text about CORBA to definate text about XDR; "CORBA" isn't
enough to specify an external representation, and I'm not sure the comment is
right if we say "IIOP". I know its right about XDR if we only mention shared
object references and not recursive structures.