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.
Jack Jansen [Fri, 24 Apr 1998 10:28:20 +0000 (10:28 +0000)]
Grmpf, a lot more routines have gotten a "Mac" prefix for their
declaration, probably so the universal headers are useable on
windows/unix too. Have to think of a more definite workaround later,
for now we manually declare the old names in the *edit.py files.
Freeze assumes that all built-in modules are part of the Python core.
This is not necessarily the case. It is possible to create a Python
binary which contains built-in extension modules. Therefore
checkextensions should be used for all unknown and builtin modules.
(Sjoerd Mullender)
If freezing with the -O option, the optimized bytecode files are
used. It is useful to implicitly set the -O flag in the frozen
application.
(Sjoerd Mullender)
When using extention modules, relative path names that occur in the
Setup file are fixed so that they will work from the freeze build
directory. However, relative path names in liner -L and -R options
are not fixed in this way.
(Sjoerd Mullender)