$ python syntaxerror HELP (version 2.5.4)
Question: Downloaded Python 2.5.4 (Windows)

Opened Python Shell and entered

    
    
    print "hello world"
    

got back

    
    
    hello world
    

Opened Notepad++

entered `print "hello world"`

saved as hello.py

exited that file and went back to the shell

entered in the shell

    
    
    $ python hello.py
    

got

    
    
    SyntaxError:  invalid syntax
    

I am not sure what is causing this. I have tried to change the directory,
atleast I think I did control panel > environment variables > path > added
;C:\Python26 to the very end I then restarted my comp and tried

    
    
    $ python hello.py
    

still got nothing but the error again. I am literally going nuts trying to get
this to work. I am very very new to python and programming languages in
general. So, if you do respond, please make it understandable to a beginner.
Thank you in advance for your help.


Answer: You are running the `python hello.py` command within the python shell itself
which is not possible. If you are in the python shell you can run `import
hello` to run the script as you want to.

