Guido van Rossum [Sat, 24 Oct 1998 16:29:21 +0000 (16:29 +0000)]
Split the goto() function in two: _goto() is the internal one,
using Canvas coordinates, and goto() uses turtle coordinates
and accepts variable argument lists.
Guido van Rossum [Sat, 24 Oct 1998 01:34:45 +0000 (01:34 +0000)]
The TemporaryFile() function has a security leak -- because the
filenames generated are easily predictable, it is possible to trick an
unsuspecting program into overwriting another file by creating a
symbolic link with the predicted name. Fix this by using the
low-level os.open() function with the O_EXCL flag and mode 0700. On
non-Unix platforms, presumably there are no symbolic links so the
problem doesn't exist. The explicit test for Unix (posix, actually)
makes it possible to change the non-Unix logic to work without a
try-except clause.
Guido van Rossum [Thu, 22 Oct 1998 20:15:36 +0000 (20:15 +0000)]
Jim Fulton writes:
"""
I've attached a long overdue patch to pickle.py to bring it to format
1.3, which is the same as 1.2 except that the binary float format
is supported. This is done using the new platform-indepent format
features of struct.
This patch also gets rid of the undocumented obsolete Pickler
dump_special method.
"""
Barry Warsaw [Thu, 22 Oct 1998 18:51:22 +0000 (18:51 +0000)]
__init__(): Removed initialcolor keyword.
show(): added color keyword here so that the selected color can be
chosen on each invocation of askcolor().
Also fixed this class, and askcolor() so that the same Chooser
instance can be re-used instead of creating a new one on each
invocation of askcolor().
Added a module function save() which can be used to explicitly save
the option database in ~/.pynche. This does not happen automatically
when used as a modal.
Barry Warsaw [Thu, 22 Oct 1998 03:44:52 +0000 (03:44 +0000)]
Chooser.__init__(): Added `wantspec' keyword to conform exactly to
tkColorChooser.askcolor() interface (i.e. don't return a color name
even if there is an exact match).
Barry Warsaw [Thu, 22 Oct 1998 03:25:59 +0000 (03:25 +0000)]
Many changes to support a second mode of operation. Pynche can now be
run either as a standalone application (by running pynche or
pynche.pyw), or as a modal dialog inside another application. This
can be done by importing pyColorChooser and running askcolor(). The
API for this is the same as the tkColorChooser.askcolor() API, namely:
When `Okay' is hit, askcolor() returns ((r, g, b), "name"). When
`Cancel' is hit, askcolor() returns (None, None).
Note the following differences:
1. pyColorChooser.askcolor() takes an optional keyword `master'
which if set tells Pynche to run as a modal dialog. `master'
is a Tkinter parent window. Without the `master' keyword
Pynche runs standalone.
2. in pyColorChooser.askcolor() will return a Tk/X11 color name as
"name" if there is an exact match, otherwise it will return a
color spec, e.g. "#rrggbb". tkColorChooser can't return a
color name.
There are also some UI differences when running standalone vs. modal.
When modal, there is no "File" menu, but instead there are "Okay" and
"Cancel" buttons.
The implementation of all this is a bit of a hack, but it seems to
work moderately well. I'm not guaranteeing the pyColorChooser.Chooser
class has the same semantics as the tkColorChooser.Chooser class.
Guido van Rossum [Wed, 21 Oct 1998 17:03:36 +0000 (17:03 +0000)]
Add note about compiling FORMS with -Dclear=__GLclear.
(The GLHACK variable isn't really needed since the change to
glmodule.c, but I'm too busy to remove it. It's harmless.)
Guido van Rossum [Wed, 21 Oct 1998 16:10:40 +0000 (16:10 +0000)]
Check in the changed version after running the stubber again -- this
solves the conflict with curses over the 'clear' entry point much
nicer. (Jack had checked in the changes to cstubs eons ago, but I
never regenrated glmodule.c :-( )
Guido van Rossum [Wed, 21 Oct 1998 15:08:40 +0000 (15:08 +0000)]
On a recommendation from Sjoerd Mullender, add -Dclear=__GLclear to
the compilation flags for the gl, fl and fm modules. This avoids a
name conflict with the curses module (both gl and curses have an entry
point called 'clear').
"""
the NEWS file of Python 1.5.2a2 inspired me to look at
Tools/scripts/untabify.py. I wonder why it accepts a -t argument
but ignores it. The following patch tries to make it somewhat useful
(i.e., to override the tabsize=8 setting). Is that agreeable?
"""
Guido van Rossum [Tue, 20 Oct 1998 14:43:02 +0000 (14:43 +0000)]
Patch by Jim Fulton, who writes:
"""
The FieldStorage constructor calls the read_multi method. The read_multi
method creates new FieldStorage objects, re-invoking the constructor
(on the new objects). The problem is that the 'environ', 'keep_blank_values',
and 'strict_parsing' arguments originally passed to the constructor are not
propigated to the new object constructors. This causes os.environ to be used,
leading to a miss-handling of the parts.
I fixed this by passing these arguments to read_multi and then on to the
constructor. See the context diff below.
"""
Guido van Rossum [Mon, 19 Oct 1998 13:28:26 +0000 (13:28 +0000)]
Fixed a problem where xmllib didn't handle the tag
<sometag attrib=">">
correctly.
Also changed comparisons of re matches and searches into explicit
comparisons with None.
(Sjoerd Mullender)
Guido van Rossum [Mon, 19 Oct 1998 02:26:16 +0000 (02:26 +0000)]
Change our special entries from <console#N> to <pyshell#N>.
Patch linecache.checkcache() to keep our special entries alive.
Add popup menu to all editor windows to set a breakpoint.
Guido van Rossum [Mon, 19 Oct 1998 02:24:40 +0000 (02:24 +0000)]
Use and pass through the 'force' flag to set_dict() where appropriate.
Default source and globals checkboxes to false.
Don't interact in user_return().
Add primitive set_breakpoint() method.
Guido van Rossum [Mon, 19 Oct 1998 02:22:41 +0000 (02:22 +0000)]
Raise priority of 'sel' tag so its foreground (on Windows) will take
priority over text colorization (which on Windows is almost the
same color as the selection background).
Jack Jansen [Thu, 15 Oct 1998 15:29:16 +0000 (15:29 +0000)]
For submenus remember the parent and parent index, so we can grey out our
entry if the menu is disabled. This does create a circular reference, so cleanup
becomes more important.
Guido van Rossum [Tue, 13 Oct 1998 20:02:39 +0000 (20:02 +0000)]
Perhaps a controversial change: when reporting a callback exception,
assign the exception info to sys.last_{type,value,traceback}. That
way, an introspective Tkinter app can inspect its own stack trace.
(The controversy is that it would keep some objects alive, but that's
probably no big deal.)