console show in Python?

Michael P. Reilly arcege at shore.net
Sat Jul 10 06:20:10 EDT 1999


Scott Shillcock <shillcoc at mry.rbd.com> wrote:
: I am moving to Python from Tcl/Tk.
: Is there something similar to the Tcl/Tk 'console show' command in
: Python.

: I am using Tkinter for my gui and once I call mainloop() I no longer
: have access to the Python command line. I want to be able to interact
: with my gui from the command line to test new code.

: From Tcl/Tk I could turn on and off the interactive command line with
: 'console show' and 'console hide'. That is all I want to do with Python.
: Can anyone help me with this or point me in the right direction.

On UNIX anyway, if you use the quit() method from the mainloop, then
you can restart from Python's interactive prompt by calling the
mainloop() method again.

The code for Tkinter should make this behavior consistant on all
platforms, but has anyone tested this there?

  -Arcege





More information about the Python-list mailing list