Basic python script

fallenapples

In Runtime
Messages
386
Location
Toronto, Ontario
I have enter my courser script for python. Everything shows up in the IDLE, but when I go to run in in CM I get an invalid syntax error with the ^ arrow pointing at win32.

Here is the code I entered and its results:

>>> import sys
>>> print(sys.platform)
win32
>>> print(2**100)
1267650600228229401496703205376
>>> x='Spam!'
>>> print(x*8)
Spam!Spam!Spam!Spam!Spam!Spam!Spam!Spam!
>>>
I saved it as a .py file. I am on a 64 bit edition of windows. I know I downloaded a 32 bit as it was all I could find could this be the problem. I get the same issues when I run it on my Mac.

Help?
 
Ran with Python 3.4 that I had on my system for testing some stuff...and it works fine for me.

File named test.py:
Code:
import sys
print(sys.platform)
print(2**100)
x='Spam!'
print(x*8)

Outputs this in the console:
Code:
C:\Python34>test.py
win32
1267650600228229401496703205376
Spam!Spam!Spam!Spam!Spam!Spam!Spam!Spam!
 
Back
Top Bottom