[Pythonmac-SIG] New Python User (needs a push)

Russell E Owen owen@astro.washington.edu
Wed, 19 Apr 2000 10:36:55 -0700


>b) No matter what I do, I can't get Tkinter to work :(. Lately I'm led to
>believe that the Mac version of Python doesn't use it, but uses the Mac
>stuff instead. Is this the case? If not, how can I get Tkinter to work?
>Whenever I run something that imports it, it dies on the line with the
>comment "If this dies your computer might not be set up for tkinter". How
>can I set up my machine for it? Thanks :)

You need to modify your path to include two things:
$(PYTHON):Lib:lib-tk
(which it sounds like you've already done, as it sounds like you've 
got beyond finding Tkinter and now need to find _tkinter)
$(PYTHON):Mac:Plugins
(it may already be set up this way)

Then make sure _tkinter.ppc.slb is in $(PYTHON):Mac:Plugins (I'm not 
sure where the installer puts it). (Note: there's another _tkinter 
for 68k Macs, in case that's what you have.)

Also be warned not to try to run Tkinter scripts interactively by 
typing them in, especially into the IDE. Put them into files and drop 
them onto PythonInterpreter, instead. Even then you may find that the 
only way to quit is to type cmd-Q (or select File:Quit) and wait for 
the script to exit. Then cmd-Q again if the interpreter isn't set up 
to automatically exit.

If you don't follow these instructions you'll probably find you have 
to force the interpreter to exit. But feel free to experiment!

-- Russell