[Tutor] Syntax Error First Example

Lie Ryan lie.1296 at gmail.com
Thu Jun 11 08:08:57 CEST 2009


Randy Trahan wrote:
> Hi,
> Just opened the book Python Programming, Second Edition by Michael
> Dawson and have my first question. Instead of the usual "Hello World" as
> the first example he asked to type this:
>  
> print "Game Over"
> raw input("\n\nPress the enter key to exit.")
>  
> First, I am suppose to put this in the script mode vs the IDLE mode
> correct? He failed to mention where..

There are a few subtle differences between running in script mode and
interactive mode; notably that you can print the repr of an object
without a print statement/function in interactive mode. However for this
particular example, the difference are not significant.

> Also, I get a syntax error at "input"? Since its my first day/hour I
> don't know how to debug and its typed in exactly as he wrote it...



> Finally, I'm running Python 2.6 on Vista. It loaded but the book did not
> mention Vista it only went up to XP. Is that ok?
Python supports Vista; maybe the book is a bit old.



More information about the Tutor mailing list