[Tutor] DOS box only works a few times

Tim Peters tim.one@home.com
Tue, 12 Dec 2000 22:25:24 -0500


[posted and mailed]

This is a known bug, and is not in Python (it's in Tcl/Tk), but nobody yet
understands it fully:

http://sourceforge.net/bugs/?group_id=5470&func=detailbug&bug_id=116289

Note that you didn't tell us what was in your p.bat, which is the only
interesting information <wink>.

A workaround is to use pythonw.exe instead of python.exe (and if you have
python.exe, you also have pythonw.exe, although you may not have noticed it
before).

> -----Original Message-----
> From: tutor-admin@python.org [mailto:tutor-admin@python.org]On Behalf Of
> Georg Simon
> Sent: Tuesday, December 12, 2000 5:58 AM
> To: tutor@python.org
> Subject: [Tutor] DOS box only works a few times
>
>
> Since I am learning not only Python but Tkinter too, I am not able to
> run my programs more than a few times.
> From IDLE I write the following example to the hard disk.
> -------------------------------------
> from Tkinter import *
>
> root = Tk()
>
> w = Label(root, text="Hello, world!")
> w.pack()
>
> root.mainloop()
> -------------------------------------
> Then I open the DOS box, type p and Enter for my batch file p.bat and
> wait for the Tkinter window. The Tkinter window I close with Alt+F4. The
> DOS prompt appears and I start again entering p . After 2 to 7
> repetitions ( count not reproducable ) the DOS prompt no longer appears
> but only the DOS cursor. The DOS box is unable to receive any
> keystrokes.
> Similar results I get with three different computers, Windows 95 and
> Windows 98, up to 128 MB RAM, and different Tkinter examples. An empty
> example like
> -------------------------------------
> from Tkinter import *
>
> root = Tk()
>
> root.mainloop()
> -------------------------------------
> seems to be more dangerous.
>
> Georg Simon
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://www.python.org/mailman/listinfo/tutor