- - Python lists
||07-21-2012 09:22 AM
Have been trying to follow a python tutorial in the Full Circle magazine and consistently fail?
I typed the following into my text editor "gedit"
#! /usr/bin/env python
print DaysInMonth (for July)
I saved the above as daysinmonth.py in my python_examples directory. I then opened a terminal and navigated to the python_examples directory and typed;
chmod +x daysinmonth.py
Finally, still in the terminal i typed python ~/python_examples/daysinmonth.py and the output was:
frump@ubuntu-linux-uk:~$ python ~/python_examples/daysinmonth.py
File "/home/frump/python_examples/daysinmonth.py", line 3
SyntaxError: invalid syntax
Would someone please tell me what i am doing wrong.
||07-21-2012 03:55 PM
Finally managed to get daysinmonth.py to work by removing (for July) hooray!
|All times are GMT +1. The time now is 06:14 PM.
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.