proble with python 2.5.1
I down loaded the newest version of python the other day and started reading about it. I decided to try an easy example, but after i saved the file it would not run it. It was the little hello world thing and i saved it as helloworld.py. when i went to EDIT to run the file i got a syntax error up at the 5 in the 2.5.1 portion at the top of the python IDLE window. Has anyone had this problem with 2.5.1 or should i re-download?
Let me seeā¦.
You saved:
Type "copyright", "credits" or "license()" for more information.
****************************************************************
Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer's internal loopback
interface. This connection is not visible on any external
interface and no data is sent to or received from the Internet.
****************************************************************
IDLE 1.2.1
>>> print "Hello World."
Hello World.
>>>
in your .py file?
A .py file should only have been:
print "Hello World."
for that code above.
All the IDLE stuff is just a prompt, where you can input one line at a time and it will execute straight away.
If this isn't what you've done, please explain to me.. it just seems that this is the way you would acheive what you've acheived.
Reaper
i dont know whats going on with this man im a complete noob at programing so really i have no clue. i found this guide http://www.byteofpython.info/read/ but when i do what it says i get a syntax error. what is the best resource for learning python?
can you maybe also post the exact code that you are using (what you put in your .py file)?
SG_Cthulhu wrote: ok i got it working sorry for wasting every bodies time. but by the way what is the best book on python, at any price. i love to read man.
reading is very good :D finally a 'noob' on hbh who isn't afraid to do some reading ;)
try out this book (o'reilly has a good reputation for publishing decent books): http://www.amazon.com/Learning-Python-Mark-Lutz/dp/0596513984/ref=pd_bbs_sr_1/103-1041609-9673433?ie=UTF8&s=books&qid=1190471355&sr=8-1
ok so im getting some of the basics and im going through richohealey's articles and they are helping (happy B-Day). but im wondering what kind of useful apps i should be looking at to get a deeper understanding of the language. im going to be getting a few O'Reilly books ASAP:"Learning Python","Python Programing", and "Python Cookbook". Any suggestions about learning materials would be ,and are appreciated. thanks.