[Tutor] Syntax error

John Jenkinson johnjenkinson1 at gmail.com
Mon Mar 23 22:10:06 CET 2009

I am using Python 2.4.1.  I am using the IDLE process, and I was not saving
as ".py".  Thank you, everyone, for your continued help.

On Mon, Mar 23, 2009 at 3:35 AM, Alan Gauld <alan.gauld at btinternet.com>wrote:

> "John Jenkinson" <johnjenkinson1 at gmail.com> wrote
>  I am trying to write a program that displays the string expression "Game
>> Over", in a console window that remains open.
>> print "Game Over"
>> raw input("\n\nPress the enter key to exit.")
>> I dont understand what is supposed to happen if the code were to be
>> correct.  Would a separate console be displayed with the text "Game Over",
>> or would I see the output in the Interactive Mode window?
> This would display the Game Over message followed by the
> Press enter key message in the window wghere the program was executing
> and then wait for the user to hit the key before closing the window..
> The problem you have is that I suspect you are using IDLE or Pythonwin
> to write the code. These tools are development tools and not what you
> would normally use to run the program. They do not display their output
> in a window but rather do so in the interactive shell within the tool.
> To see the program act as the auithor intended save the file with a
> .py extension and then double click on it in Windows Explorer
> (assuming you are on Windows!). This will open a Command window
> with the program running inside.
> Finally, to select error messages for posting you need to do something
> similar.
> Start a command window (Start->Run, type CMD, hit OK). At the OS
> command prompt type python and then drag your program file onto the window.
> This will run the program and leave the error message on screen. You can
> then
> use the control menu(click on the window icon) Edit->Mark, Edit->Copy to
> select the text and copy it to the clipboard so that you can paste it into
> a
> mail message.
> HTH,
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090323/293c41db/attachment.htm>

More information about the Tutor mailing list