Really dumb question!

Steve Holden sholden at holdenweb.com
Wed Feb 26 07:38:29 EST 2003


"Manuel M. Garcia" <mail at manuelmgarcia.com> wrote in message
news:idko5v8cbekoj0r367ulkdf32nu15tvj42 at 4ax.com...
> On 25 Feb 2003 14:37:58 -0800, snarflemike at yahoo.com (Mike Silva)
> wrote:
>
> >So, my son and I are playing around with Python, esp. the turtle
> >module, and we can't figure out a way to stop the program!  Ctrl-C (in
> >any window) doesn't do it, and closing the Tk graphics window doesn't
> >do it (just opens up again and continues drawing).  This gets to be a
> >problem when he decides to draw 10 lines and types in 100 by mistake!
> >
> >So, my really dumb question is -- how do we kill an executing program,
> >in particular one doing (turtle) graphics?!
> >
> >Mike
>
> Are you using Windows?  ActivePython?  I have some versions of Windows
> to play with at work.  If you tell me your version of Windows and
> Python, I can send you an email to walk you through it.
>
> In general, Python running in Windows is not responsive to Ctrl-C.
> The way to stop the program is to close the parent window.  (The
> parent window might be Command Prompt, or PythonWin, or its own text
> window)  If you run your scripts by double-clicking on an icon, use
> the .py extension instead of the .pyw extension, and the parent window
> will always be visible.
>


Manuel:

Try using CTRL/Break in Windows, that will usually break into a
console-based program even when CTRL/C isn't regarded as urgent enough.

I suspect that Mike's problem is more that he's writing graphics output into
a Tkinter window from a console-based program, and he wants some way to
indicate to the program that it should stop what it's doing before it's
finished, and wait for further input from the user. Right, Mike?

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Register for PyCon now!            http://www.python.org/pycon/reg.html







More information about the Python-list mailing list