MacPython: Tkinter vs. CLI

Nils Kassube nika at
Sat Aug 21 13:33:31 EDT 1999

Guten Abend.

I'm learning Python using the excellent "Learning Python"
book by Mark Lutz and David Ascher. Unfortunately, it was
only necessary to read a few pages to hit something I'd
call strange behaviour in the Mac port:

from Tkinter import *
w = Button(text="Hallo", command='exit')

If I drop a file containing these lines on the Python
interpreter, it works as expected. But if I type it
in Python's CLI it opens an inactive and empty window
after line 2 and then the CLI stops reacting to keyboard
input. You can still quit the Python application via the
"Quit" menu item after clicking in the Tk window, then
it's possible to use File/Quit to exit the interpreter.

Useful information:

Python 1.5.2b1 (#47, Jan 13 1999, 15:14:59)  [CW PPC w/GUSI
Mac OS 8.6 (German), 25 MB allocated to Python

Lübeck, Germany - The Marzipan City

More information about the Python-list mailing list