[Pythonmac-SIG] Tkinter interfaces in MacPython 2.2 on MacOs

David A Willcox dwillcox@prairienet.org
Fri, 29 Mar 2002 11:55:37 -0600


> Date: Fri, 29 Mar 2002 08:12:33 -0500
> To: pythonmac-sig@python.org
> From: "Louis M. Pecora" <pecora@anvil.nrl.navy.mil>
> Subject: Re: [Pythonmac-SIG] Tkinter interfaces in MacPython 2.2 on MacOs
>  8.1
> 
> >I wonder if anyone has tried the Tkinter libraries in Python 2.2 on MacOS 8.1.
> >
> >When I try it, the interpreter hangs.  I'm not doing anything fancy, just a
> >simple "put up a single button window" straight out of the book.
> 
> I think I recently tried a Piddle (plotting package--quite nice, but
> it needs some care and feeding) by dropping a test module on the
> interpreter and that seemed to work with a Tk window.  I'm using system
> 9.1 on a G3, PB, and G4 set of Macs.
> 
> Can you quit the interpreter?

No, I can't quit the interpreter. My Tk window appears, but when I
click its "quit" button, the window doesn't go away. It stays hidden
behind the PythonInterpreter.out window.  It accepts some inputs (the
"window shade" button works), but I don't see the print that is
supposed to happen after return from mainloop().  I have to force-quit
the interpreter; it won't quit voluntarily.

After playing around, I did manage to get it to work.  Kind of kludgy,
though.  When the program first starts, the Tk window appears in front,
but at that point it doesn't seem to accept any input.  I can't
resize the window, for example.  However, if I bring the
PythonInterpreter.out window to the front, and then bring the Tk window
back to the front, everything is fine.  I can resize the window, and
clicking the button makes everything terminate successfully.  (Well,
at least usually.  Sometimes it still gets confused.