[Pythonmac-SIG] Re: Macpython/Tkinter newbie question
Russell E. Owen
rowen at cesmail.net
Thu Feb 12 17:51:25 EST 2004
In article <5.0.2.1.2.20040213081036.01e38b20 at mail.phy.auckland.ac.nz>,
rjk <rjk at phy.auckland.ac.nz> wrote:
> Hi All,
>
> Sorry in advance if this question/bug has already been reported.
>
> I am trying to run a python script that uses Tkinter on a Mac that was
> originally written on a PC. The Mac is running OSX 10.2.3 and MacPython 2.3.
>
> I think the problem can be simplified to the following:
>...
> from Tkinter import Tk
> from tkSimpleDialog import askinteger
> root=Tk()
> myInt=askinteger('title','prompt')
>
>...creates a dialog which lacks a title bar and does not render the
title. It gets worse when I try to use an 'initialvalue' for the integer
on the Mac -- the 'textbox' renders on top of the 'prompt'.
I can confirm this on my MacOS X 10.3.2 box. I have no explanation,
however.
I also tested this using Python 2.3.3 built to use X11 (again on MacOS X
10.3.2). That worked just fine.
Finally, I compared the two versions of tkSimpleDialog.py (for 2.3 as
installed in the built-in Python and for 2.3.3) and found no
differences. So the bug is either elsewhere (but I can't imagine where),
or (surely not likely?) the version of tkSimpleDialog being used by the
Framework python doesn't properly match the text version.
If you are OK using X11 instead of Aqua, it's a quite reasonable way to
go. (Contact me if you want instructions).
Also if you really are running 10.2.x then you could build a new
Framework python 2.3.3 by building from source. Don't try this on
10.3.x, however, as it collides in some way with the built in Python.
-- Russell
More information about the Pythonmac-SIG
mailing list