[Tutor] I am new to python and programming!.. it is not running the module

Denis spirou@carolo.net
Tue, 25 Jan 2000 17:40:47 +0000

> ryan mcmenamin wrote:
> I type in what my book tells me to for the code
>   File "C:\Program Files\Python\hello.py", line 1
>      Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on
> win32
>               ^
>  SyntaxError: invalid syntax

You try to write a module in the command line interpreter ...

When you get the >>> prompt, you may write things like
>>> a = 5 
and then press enter,
then you will get a new >>> prompt, there you could write
>>> print a
and then press enter,
the interpreter will write :
and then you'll get a new >>> prompt
and so on.

If you want to type in a "HelloWorld.py", then you must first open a new
window :
File --> New Window  (I guess it should be Ctrl-N under Windows).
Then you'll get a brand new window completely white.
Type your lines there in and run the file (F5 - Run)

Don't forget the Idle doc if you want to know more about it.

Have fun