python - help for a new person learning - set up and errors

Joined
Jun 10, 2012
Messages
1
Reaction score
0
hi,

I am new to programming and have chosen python...

I currently have python v2.7.3 and active python 2.7 installed as recommended by several sites

I should mention that I am using windows 7.

Firstly, please recommend a good resource to learn this language, as most do not seem to deal with new learners especially when it comes to errors and setting up the software to start learning . There seem to be too many gaps and then it seems that I will have to go through frequent errors and look around for help

Secondly, I am trying to run a file that goes as such

print "Hello World!"
print "Hello Again."
print "I like typing this."
print "This is fun."
print "Yay! printing."
print "I'd much rather you 'not'"
print "I "said" do not touch this"

saved as ex1.py to a folder created for the exercise

this was done using gedit, as part of the first exercise from the book learn python the hard way, saved as ex.py and then run from cmd and python terminal

This gave an error as such
>>> python ex.py
File "<stdin>", line 1
python ex.py
^
SyntaxError: invalid syntax
>>>

I have seen a few forums that say the command is being from from the python interpreter and it should be done differently

I have added the python path in user environment variables, if that is important

Can some one explain what that means and how to do it? For a new learner this is very discouraging and I hope some one can help me get this right
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top