[Tutor] Need help with Hello World (Laughing in the backgroun d)

alan.gauld@bt.com alan.gauld@bt.com
Tue, 29 Jan 2002 10:46:37 -0000


> OK, I've got Windows Python 2.2 on a Celeron 700mhz computer. 
> I run the IDLE and put in Hello, World! I save it as hello.py 
> on the desktop and then say run script from the edit menu. It says
>   File "C:/WINDOWS/Desktop/hello.py", line 1
>     Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit 
> (Intel)] on win32
>              ^
> SyntaxError: invalid syntax
> So, the question is, what's wrong with it?

You saveed the interpreter(Python shell) session.

You need to do File|New to open a new file window 
and type the program in there.

What has happened is you saved the shell(with the >>> prompt) 
and Python tried to execute the welcome message as if it 
were a program, it couldn't so gave you an error...

Alan g.