Fred Drake [Thu, 7 May 1998 01:38:16 +0000 (01:38 +0000)]
New helper script to build the .dvi for a Python manual; usable for the
api, ext, ref, and tut manuals. The Library Reference requires too much
special index processing to make it beneficial to extend this to support
it.
Fred Drake [Wed, 6 May 1998 17:28:23 +0000 (17:28 +0000)]
When a file name is selected ("OK" button, <Return> in the filename entry),
and the "key" keyword parameter was used to invoke .go(), use the directory
of the selected file as the stored directory to return to when the same key
is used again. This is useful since the user may well entry at least part
of the path in the filename box instead of doing a lot of clicking around in
the listboxes.
After variable expansion, what was formerly a single word can now
contain multiple words, all of which may have to be joined with the
path of the extension directory.
(Sjoerd)
Patches to make the proxy code work again. (Why does that always break
as soon as I change things even just a little bit? :-) Even works
when accessing a password-protected page through the proxy. Prompted
by complaints from, and correct operation verified by, Nigel O'Brian.
Take out the check for AUTH-LOGIN or AUTH=LOGIN in login() -- some
servers support LOGIN but don't advertise it. If it's not supported
the protocol will respond NO. Approved by Piers Lauder.
Another optimization, probably of negligeable effect: instead of
calling self.tk.getint() and self.tk.getdouble(), call the globals
getint() and getdouble(), which in turn are just names for the Python
builtins int() and double(). (Making them globals actually save a
dict lookup compared to using the built-in.) The corresponding
methods of class Misc have been changed similarly. (Note that
getboolean() hasn't been changed because there's no Python
equivalent.)
The use of int() and float() has another advantage: if/when Tcl calls
can actually return Tcl objects with other types than string, use of
int() and float() is essential.
Save a tiny bit of time: self.tk.call takes a tuple argument so it's
not needed to say apply(self.tk.call, t); self.tk.call(t) has the same
effect. This cuts down tremendously on the number of apply() calls
made. No measurable effect, but at the very least it saves the lookup
of apply() in the globals!
Still somewhat experimental speedup. This appears to speed up the
most common interface to Tcl, the call() method, by maybe 20-25%.
The speedup code avoids the construction of a Tcl command string from
the argument list -- the Tcl argument list is immediately parsed back
by Tcl_Eval() into a list that is *guaranteed* (by Tcl_Merge()) to be
exactly the same list, so instead we look up the command info and call
the command function directly. If the lookup fails, we fall back to
the old method (Tcl_Merge() + Tcl_Eval()) so we don't need to worry
about special cases like undefined commands or the occasional command
("after") that sets the info.proc pointer to NULL -- let TclEval()
deal with these.
Add a new method of interpreter objects, interpaddr(). This returns
the address of the Tcl interpreter object, as an integer. Not very
useful for the Python programmer, but this can be called by another C
extension that needs to make calls into the Tcl/Tk C API and needs to
get the address of the Tcl interpreter object. A simple cast of the
return value to (Tcl_Interp *) will do the trick now.
If USE_STACKCHECK is defined use PyOS_CheckStack() in the repr and str
routines. This catches a slightly different set of crashes than the
recursive-repr fix.
(Jack)
Inspired by Ben Sayer, rewritten the code and some of the comments to
be more intelligent when the database already exists (use the module
for the existing file, according to whichdb). Noted in the doc
strings that there doesn't seem to be a different between 'c' and 'n'.
When setting the event structure fields, don't die when the widget
name is not registered; simply use the string. This happens for
tear-off widgets (e.g. if you've registered enter/leave events for the
menu).
Instead of calling mktime(), which has all sorts of unwanted side
effects, simply zero out the struct tm buffer before using it; this
should take care of the BSD folks' concern just as well.
Feeble attempt at making urlopen more robust -- don't call splituser()
when splithost() returned no useable host, to avoid calling
splituser() on None.
Fred Drake [Sat, 25 Apr 1998 04:11:27 +0000 (04:11 +0000)]
Paper size / font size configuration file.
This is separated so I can build A4 and US Letter sizes without having to
edit files.
Anyone who downloads the source package can also simply edit this file,
which is a lot shorter than the manual.cls file, and easier to find the
appropriate line.