Hi,
I am new to Python. Just started learning it. I am just trying to follow the book and run the example given in the book. I created a module by saving 2 python statements in notepad and saved the file in .py format just like the book said. the two statements are:
print 2**8
print 'test'
I saved the file as test.py. The book's example given is using shell. I am using the Python installed for Windows. I also checked the tutorials for Windows. I tried the following and none of them worked:
>>>python test.py
>>>C:\Python25> python test.py
the error message for both:
SyntaxError: Invalid syntax
For python test.py the word is high lighted in red with the error message. and for the C:\ the : is high lighted in red with the error message.
I also tried setting the path in dos using set path=%path%;c:\ python25
My question is, how do I run the script using the Python editor in Windows?
Thanks!
I am new to Python. Just started learning it. I am just trying to follow the book and run the example given in the book. I created a module by saving 2 python statements in notepad and saved the file in .py format just like the book said. the two statements are:
print 2**8
print 'test'
I saved the file as test.py. The book's example given is using shell. I am using the Python installed for Windows. I also checked the tutorials for Windows. I tried the following and none of them worked:
>>>python test.py
>>>C:\Python25> python test.py
the error message for both:
SyntaxError: Invalid syntax
For python test.py the word is high lighted in red with the error message. and for the C:\ the : is high lighted in red with the error message.
I also tried setting the path in dos using set path=%path%;c:\ python25
My question is, how do I run the script using the Python editor in Windows?
Thanks!
Comment