[Pythonmac-SIG] Problems using TKinter and with Python 1.5.2c
Jörg Kantel
joerg@kantel.de
Sun, 12 Mar 2000 15:30:58 +0100
>I keep getting the following message from Python, when I attempt to use
>any of the demo TK scripts:
>
>Traceback (innermost last):
> File "harddrive:Python
>1.5.2c1:Demo:tkinter:matt:animation-w-velocity-ctrl.py", line 1, in ?
> from Tkinter import *
> File "harddrive:Python 1.5.2c1:Lib:lib-tk:Tkinter.py", line 8, in ?
> import _tkinter # If this fails your Python may not be configured for
>Tk
>ImportError: No module named _tkinter
There is a bug in the Installer of MacPython1.5.2c1: It puts the
Shared Libs "_tkinter.CFM68K.slb" as well as "_tkinter.ppc.slb" in
the folder "TK" which is in the Folder "Imaging" in the Folder
"Extensions". You have to put one of them (or both ;o) in the Folder
"PlugIns" which is in the Folder "Mac".
And also the fresh Standard-Installation has no Path to
"$(PYTHON):Lib:lib-tk", you have to add that manually with the
Programm "EditPythonPrefs".
Unfortunately there is also a bug within the Interpreter. Calling
"Tkinter" from the Interpreter interactive freezes them. You can only
run Tk-based Python scripts by typing them in your editor and running
them by dropping over the Interpreter.
To Jack (or others ;o): I posted this bugs several times in the
mailing list. Will it be fixed? (I need interactive access to Tkinter
urgently - so I run 1.4 mostly :o( ).
HTH (and excuse my bad (d)english... ;o)
J"org
--
----------------------------------------------------------------------
----------------
J"org Kantel Max Planck Institute for the History of Science
Computer Department http://www.mpiwg-berlin.mpg.de/staff/kantel/kantel.html
Wilhelmstr.44 email: kantel@mpiwg-berlin.mpg.de email
private: joerg@kantel.de
D-10117 Berlin phone: +4930-22667-220 fax: +4930-22667-299
----------------------------------------------------------------------
----------------