(Dec 9, 2012 05:13 AM)Mohatu Wrote: Alright so python was not added to your path, search on Google how to do that, it's very simple.
The second error you're getting means you have a problem with your code, are you sure you copied it exactly how it is in the tutorial? If so, post it here, I'll take a look at it.
Alright, I added python to my path. I was told that the reason it didn't work the way I did it was because it was through python and not through command prompt, so I tired again like this:
At first I got the [errno2] message, but then I did change the directory over to where the file is located, typed in the command and then absolutely nothing happened. This is what my command prompt screen looks like:
C:\Users\Name>cd test1
C:\Users\Name\test1>python ex1.py
C:\Users\Name\test1>
But here is what the tutorial tells me to type into gedit and what should happen:
1 "Hello World!"
2 "Hello Again"
3 "I like typing this."
4 "This is fun."
5 'Yay! Printing.'
6 "I'd much rather you 'not'."
7 'I "said" do not touch this.'
Once that is what the Gedit screen looks like, I was to save it under the file name: ex1.py and then the following instructions were given:
"Then in Terminal run the file by typing: python ex1.py
If you did it right then you should see the same output as I have below. If not you did something wrong. No, the computer is not wrong.
What you should see:
$ python ex1.py
Hello World!
Hello Again
I like typing this.
This is fun.
Yay! Printing.
I'd much rather you 'not'.
I "said" do not touch this.
$
However, obviously that is not what is happening to me. And I promise I typed it into gedit verbatim, I checked it over 10 times.
I even started over, uninstalled gedit and reinstalled it and recreated the file verbatim and the same exact thing happened: Absolutely nothing.
(Dec 9, 2012 10:26 AM)Eight Wrote: Try doing :
Code
C:\Python27\python.exe yourfile.py
After adding C:\python27 to the environment variables (like Mohatu said), you can do python file.py and it will successfully run it. Maybe then you can get Geany for Windows and use it as a lightweight IDE, it supports a variety of languages including python. Or some other IDE, I don't know much about those though..
The same thing happened as I explained in my response to Mohatu, nothing. :(
Also, I just received the following e-mail from the author of the course:
"You don't do it from gedit actually, you do it from powershell. Are you familiar with powershell?"
However, the issue is, is that powershell appears to be nothing more than another terminal just like command prompt, following the same exact syntax and everything, just under a different name. How I am supposed to use gedit and powershell interchangeably is beyond me. Please explain this.