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

Discussion in 'Python' started by ethanhunt22, Jun 10, 2012.

  1. ethanhunt22


    Jun 10, 2012
    Likes Received:

    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 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 and then run from cmd and python terminal

    This gave an error as such
    >>> python
    File "<stdin>", line 1
    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
    ethanhunt22, Jun 10, 2012
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.