Newb Python Problem
I've decided that I wanted to learn some programming basics. I started by using this guide http://learnpythonthehardway.org/book/index.html
It took me an embarrassingly long time to get through exercise 0 which is getting python installed and running.
I moved to exercise 1 http://learnpythonthehardway.org/book/ex1.html and am failing miserably. The step tells you to create a basic code using the print command. It doesn't say what program to use to write this but I'm assuming its gedit, which the tutorial asked me to install earlier.
It says to save that file as ex1.py but does not list what directory I should save this in. I saved the code in a folder I created in my personal folder.
When I try to run this program in the terminal I get an error message that python cannot run the file because of [errno 2] No such file or directoy.
I'm guessing this has to do with how I'm saving the code but I am stumped.
Any help would be greatly, greatly appreciated.
Thanks in advance!
Simple questions/requests: What did you run in your terminal? Where is your file located?
The file I created is located at
The file is saved as ex1.py
In the terminal I type python ex1.py which is what the guide I was following says to do. I'm guessing python can't locate the file ex1.py.
Forgot to mention I'm running this on Windows 7.
I've taken all the steps to make sure python is working just can't get this specific program to run.
Type in the command line:
And see if your file is there. You might not have cd'd to the right directory / your file editing program may have added an unwanted extension to the python file.
|All times are GMT +1. The time now is 07:49 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.