Error trying to run a python program

Posted by Ana on Ask Ubuntu See other posts from Ask Ubuntu or by Ana
Published on 2012-02-07T23:31:38Z Indexed on 2012/06/01 4:49 UTC
Read the original article Hit count: 397

Filed under:
|

Hello guys I'm actually new to Terminal and Python. Just started following a Python tuturial on my Ubuntu and I've reached a part where it asks me to save a .py file and open it in Terminal.

Only when I try to type on Terminal $ python egotrip.py I get $: command not found Then I try to type it in python and I get

File "", line 1
    python egotrip.py
                 ^
SyntaxError: invalid syntax

But I mean all names are correct :(

Then I gave also tried /home/anacah/Desktop/python/egotrip.py And I get

Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'home' is not defined

What am I doing wrong? :( can someone please help?

© Ask Ubuntu or respective owner

Related posts about python

Related posts about gnome-terminal