Embarrassing enough computer question
March 5, 2011 7:56 PM Subscribe
I have an unbearably noob question about learning python...I can't run my program?
So I have a bit of downtime this weekend and wanted to start learning Python. I'm a web producer but haven't programmed in many years, just a few classes in college.
I downloaded 2.7.1 and tried following along with this tutorial but I can't even get past the first step! I created my hello program and saved, and then the tutorial says "now run your program..." how? Even the hint to use Edit and then run doesn't lead me anywhere...can anyone help? I am using IDLE that came with the download and am on a MacBook Pro...am I on the wrong tutorial for Macs?
So I have a bit of downtime this weekend and wanted to start learning Python. I'm a web producer but haven't programmed in many years, just a few classes in college.
I downloaded 2.7.1 and tried following along with this tutorial but I can't even get past the first step! I created my hello program and saved, and then the tutorial says "now run your program..." how? Even the hint to use Edit and then run doesn't lead me anywhere...can anyone help? I am using IDLE that came with the download and am on a MacBook Pro...am I on the wrong tutorial for Macs?
Response by poster: would have been a great thing to add to the tutorial. Thanks.
posted by sweetkid at 8:30 PM on March 5, 2011
posted by sweetkid at 8:30 PM on March 5, 2011
Best answer: Personally, I just like to put #!/bin/python in the first line of my programs and run them from a terminal with ./whatever.py. There's a zillion IDEs for python if you tire of IDLE.
posted by pwnguin at 11:30 PM on March 5, 2011 [1 favorite]
posted by pwnguin at 11:30 PM on March 5, 2011 [1 favorite]
Best answer: Depending on your previous experience, you might try Dive into Python or Dive into Python 3.
posted by mmascolino at 6:34 AM on March 6, 2011
posted by mmascolino at 6:34 AM on March 6, 2011
Personally, I just like to put #!/bin/python in the first line of my programs and run them from a terminal with ./whatever.py.It's worth pointing out that you'll need to set the executable bit on the script file to run it that way:
chmod u+x whatever.py
Alternately, you can also do:
python whatever.py
posted by usonian at 7:49 AM on March 6, 2011
Best answer: This is another Python learning resource you might want to take a look at - it's aimed at people with no programming background and takes up about a month of a semester-long course covering various Web topics.
It doesn't use IDLE, but uses TextWrangler as the text editor and has you starting the program from the command line, as in pwnguin and usonian's comments.
posted by needled at 11:35 AM on March 6, 2011 [1 favorite]
It doesn't use IDLE, but uses TextWrangler as the text editor and has you starting the program from the command line, as in pwnguin and usonian's comments.
posted by needled at 11:35 AM on March 6, 2011 [1 favorite]
This thread is closed to new comments.
posted by holgate at 8:05 PM on March 5, 2011