configuring 1.5.2c1 on Mac for Tkinter ?
Jörg Kantel
kantel at mpiwg-berlin.mpg.de
Tue Dec 28 04:16:37 EST 1999
In article <3867F0AD.361B33D1 at ctrvax.vanderbilt.edu>, Allen W. Ingling
<ingling at ctrvax.vanderbilt.edu> wrote:
> Hello,
>
> I'm new to Python. I've just installed the Macintosh self-installing
> python distribution version 1.5.2c1. Apparenlty, it is not
> pre-configured for Tkinter. If I import Tkinter, I get an error, "No
> Module Named Tkinter".
Unfortunately the installer seems to be broken - it was working well
with 1.5.1 :-( At first you have to look for some shared libs - I found
them for unknown reasons in the imaging folder within the Extensions
folder. Drag these libs into the PlugIns Folder within the Mac Folder.
After that you have to run the EditPythonPrefs Applet and add the
following line "$(PYTHON):Lib:lib-tk" to your sys path.
Now you can run your python scripts with Tkinter.
Unfortunately there is a second bug and I know no workaround for that.
You can't work with Tkinter interactively form the interpreter. After
the statement "import Tkinter" and the first "pack" command the
interpreter hangs. Writing your script in a texteditor and run it works
however.
I'm very unhappy about that but it seems that there is at the moment no
one at the MacPython community who is able to support the Tk-stuff.
(They all working at the IDE and the Toolbox calls.) I by myself have
no time, too :-( But I think it's important, that we have a platform
independet GUI Toolkit on the Mac also...
HTH
J"org
Pls excuse my bad (d)english
More information about the Python-list
mailing list