[Tutor] program spontaneously closes...

Alan Gauld alan.gauld at btinternet.com
Mon Nov 27 00:29:58 CET 2006

"Alan Gilfoy" <agilfoy at frontiernet.net> wrote

> The command line program seems to work through my program OK, but 
> the
> command line program shuts down immediately after the program has 
> run

Yes this is normal behaviour.
There are several ways around it, one of which is the
raw_input trick you have used.

Another is to change the Python startup behaviour to include
the /i parameter to python which causes the interpreter not
to exit - handy for debugging faulty scripts.

These options are discussed near the end of the Style topic in
my tutor

Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list