>>> python test1.py / Traceback ( File "<interactive input>", line 1

leroybt.rm leroybt at rocketmail.com
Wed Nov 26 01:19:39 CET 2003


I don't understand why this does not work:

<FILE1> test1.py

#Import Packages
import string
#
data=0
data=data+1

print data

<FILE2> test2.py

#Import Packages
import string
#
if __name__ == "__main__":
data=0
data=data+1

print data

<Pythonwin>
>>> python test1.py
Traceback ( File "<interactive input>", line 1
python test.py
^
SyntaxError: invalid syntax
>>> python test2.py
Traceback ( File "<interactive input>", line 1
python test.py
^
SyntaxError: invalid syntax
>>>

I just don't understand why theSE line command do not work? Im new to 
Pythonwin. But not new to programming (background C,C++,java,tcl, 
perl,jovial,etc...)

I decided to pick up this language because I wanted a powerful script 
language at hand - tcl sucks!







More information about the Python-list mailing list