Fred Drake [Tue, 9 Nov 1999 17:02:11 +0000 (17:02 +0000)]
\programopt: New macro, used to mark command-line parameters in the
text. Looks like \program.
\citetitle: New macro, used to mark titles of cited works (like the
names of the Python manuals). Accepts & discards an
optional parameter that is only used by the HTML
formatter. Looks like \emph.
Fred Drake [Tue, 9 Nov 1999 16:59:42 +0000 (16:59 +0000)]
do_cmd_programopt(): New function, similar to do_cmd_program().
do_cmd_citetitle(): New function. Extracts one optional and one
required parameter. If the optional one is
provided, it is used a URL (or relative URL) and
the text of the required parameter is turned into
a hyperlink.
Patch by Dieter Maurer to make things work for Tcl/Tk 8.1. This
simply moves the call to Tk_MainWindow() after the Tcl/Tk
initialization calls. The patch is unconditional, it works with
earlier and later versions as well.
Patch by Dieter Maurer to make things work for Tcl/Tk 8.1 (tested with
8.1.1). His approach doesn't work with Tcl/Tk 8.2, so I've placed it
inside #if TKMAJORMINOR == 8001 and #endif. See also his patch for
tkappinit.c.
Jack Jansen [Fri, 5 Nov 1999 15:54:46 +0000 (15:54 +0000)]
Added HAVE_LIMITS_H, MAVE_MEMMOVE, HAVE_STRERROR, HAVE_LOCALE_H
since we have these in the current CW release (and probably already had them
quite some time, but never added the defines).
Fred Drake [Thu, 4 Nov 1999 19:19:48 +0000 (19:19 +0000)]
split() docstring: Made signature and description for the first
parameter match. Error pointed out by François
Pinard <pinard@iro.umontreal.ca> on c.l.py.
Barry Warsaw [Wed, 3 Nov 1999 18:47:52 +0000 (18:47 +0000)]
Several improvements, some of where were contributed by Bernhard
Herzog <herzog@online.de>. Specifically,
--verbose/-v flag added
pot_header added to make msgmerge and Emacs po-mode work better
normalize(), escape(), safe_eval(): Improved normalization of strings
for more .po file compatibility (e.g. C style). Handles emmbedded
newlines better.
Also added an identity function called _() and use it in the file
where messages are printed. This allows us to selftest pygettext.py
with itself as input.
I regularly find that pdb sets the breakpoint on the wrong line when I
try to set a breakpoint on a function. This fixes the problem
somewhat.
The real problem is that pdb tries to parse the Python source code to
find the first executable line. A better way might be to inspect the
code object, or even have a variable in the code object
co_firstexecutablelineno, but that's too much work.
The patch fixes the problem when the first code line after the def
statement contains the start *and* end of a triple-quoted string. The
code assumed that the end of a triple-quoted string is not on the same
line as the start, and so it would skip to the end of the *next*
triple-quoted string.
Checking in a bunch of spawn functions. These are only defined if we
have fork and execv (and friends) but not spawnv. They operate
exactly like the spawn functions on Windows. A limited set of needed
constants is also defined (P_WAIT, P_NOWAIT etc.).
Also add getenv() as a familiar alias for environ.get().
Guido van Rossum [Tue, 26 Oct 1999 00:12:20 +0000 (00:12 +0000)]
Fix PR117. The error message is "keywords must be strings". Perhaps
not as descriptive as what Barry suggests, but this also catches the
(in my opinion important) case where some other C code besides apply()
constructs a kwdict that doesn't have the right format. All the other
possibilities of getting it wrong (non-dict, wrong keywords etc) are
already caught so this makes sense to check here.
Greg Ward [Sat, 23 Oct 1999 19:25:05 +0000 (19:25 +0000)]
Don't assume GNU tar -- generate tar file and compress in separate steps.
Now supports the full range of intended formats (tar, ztar, gztar, zip).
"-f" no longer a short option for "--formats" -- conflicts with new
global option "--force"!
Fred Drake [Wed, 20 Oct 1999 21:50:31 +0000 (21:50 +0000)]
Module/script to parse the reference count data file and make the
information accessible to Python.
When run as a script, just dumps the information back out in the data
format, with functions in sorted order and a blank line between
different functions.
Jeremy Hylton [Mon, 18 Oct 1999 22:25:22 +0000 (22:25 +0000)]
print a warning if the password will be echoed.
At import time, getpass will be bound to the appropriate
platform-specific function. If the platform's echo-disabler is not
available, default_getpass, which prints the warning, will be used
Guido van Rossum [Mon, 18 Oct 1999 21:41:43 +0000 (21:41 +0000)]
Fix for PR#111: when using the inplace option, give the new file the
same permissions as the old file, plugging a security hole.
(Not using exactly the suggested bugfix.)
Guido van Rossum [Sun, 10 Oct 1999 21:14:25 +0000 (21:14 +0000)]
Jeremy writes:
I found the following patch helpful in tracking down a bug in some
code. I had appended time, the module, instead of time.time(). Not
sure if it is generally true that printing the repr of the object is
good, but I expect that most unpicklable things will have fairly
information and concise reprs (like files or sockets or modules).
Withdraw the change that Fred just checked in -- it was a poorly
documented feature, not a bug, to ignore I/O errors in read().
The new docstring explains the reason for the feature:
"""
this is designed so that you can specifiy a list of potential
configuration file locations (e.g. current directory, user's home
directory, systemwide directory), and all existing configuration files
in the list will be read.
"""
Also add a lower-level function, readfp(), which takes an open file
object (and optionally a filename).
XXX There are some other problems with this module, but I don't have
time to dig into these; in particular, there are complaints that the
%(name)s substitution from the [DEFAULTS] section doesn't work
correctly.
Greg Ward [Sun, 3 Oct 1999 21:02:48 +0000 (21:02 +0000)]
Added 'force' and 'quiet' (negative alias for 'verbose') to the
global options table.
Every Command instance now has its own copies of the global options,
which automatically fallback to the Distribution instance. Changes:
- initialize them in constructor
- added '__getattr__()' to handle the fallback logic
- changed every 'self.distribution.{verbose,dry_run}' in Command to
'self.{verbose,dry_run}'.
- filesystem utility methods ('copy_file()' et al) don't take 'update'
parameter anymore -- instead we pass 'not force' to the underlying
function as 'update'
Changed parsing of command line so that global options apply to all
commands as well -- that's how (eg.) Command.verbose will be initialized.
Simplified 'make_file()' to use 'newer_group()' (from util module).
Deleted some cruft.
Some docstring tweaks.
Greg Ward [Sun, 3 Oct 1999 20:50:41 +0000 (20:50 +0000)]
Fixed 'mkpath()' to normalize the path right off the bat -- cleans up
the code a bit and should make it work under Windows even with trailing
backslash.
Fixed a couple of docstrings.
Added comment about 'make_file()' possibly being redundant and unnecessary.
Greg Ward [Sun, 3 Oct 1999 20:47:52 +0000 (20:47 +0000)]
Catch up with changes in 'gen_lib_options()':
- change how we call it
- added methods 'library_dir_option()', 'library_option()', and
'find_library_file()' that it calls
Added 'force' flag; it's automatically "respected", because this class
always rebuilds everything! (Which it to say, "force=0" is not respected.)
Greg Ward [Sun, 3 Oct 1999 20:45:33 +0000 (20:45 +0000)]
Fixed order of link options: object files now precede library stuff.
Catch up with changes in 'gen_lib_options()':
- change how we call it
- added methods 'library_dir_option()', 'library_option()', and
'find_library_file()' that it calls
Added 'force' flag and changed compile/link methods to respect it.
Greg Ward [Sun, 3 Oct 1999 20:41:02 +0000 (20:41 +0000)]
Slight change to the meaning of the 'libraries' list: if a library name
has a directory component, then we only search for the library in
that one directory, ie. ignore the 'library_dirs' lists for that
one library.
Changed calling convention to 'gen_lib_options()' again: now, it takes
a CCompiler instance and calls methods on it instead of taking
format strings. Also implemented the new "library name" semantics
using the 'find_library_file()' method in the CCompiler instance.
Added 'force' flag to CCompiler; added to constructor and 'new_compiler()'.
Added 'warn()' method.
Attached is a context diff to winsound.c that adds a Beep() function
to play a sound through the PC speaker. Seems to make sense to have
this added, so I just went and did it!