[Tutor] cmd window

Wayne Werner waynejwerner at gmail.com
Tue Sep 13 20:25:05 CEST 2011

On Tue, Sep 13, 2011 at 12:57 PM, Dinara Vakhitova
<di.marvellous at gmail.com>wrote:

> Hello,
> Excuse me for my stupid question, but I'm an absolute beginner in
> programming.
> I just would like to know what should I do in such case: when I run my
> program by clicking on the file itself, rather than from IDLE, the cmd
> window disappears just immediately after the output printing, so that I
> can't even see it. The solution must be very simple, but I can't find it in
> tutorials...

This is mainly because in later versions of Windows (XP onward, I believe)
they changed a setting so that the command window would close after a
program has executed. There are probably some more complicated settings to
fix it on a global basis, but you'll find that most people add this line to
the end of their programs:

raw_input("Press <Enter> to continue") # Use input() with Python 3.x

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110913/70c58e71/attachment.html>

More information about the Tutor mailing list