On 4/28/07, Alexander Dering <[EMAIL PROTECTED]> wrote:

>  But I can't get it to run directly from Python. If I go to the terminal and
> type "python hello.py" (which is what the instructions say I should be
> doing!) I get the following:
>
> >>> hello.py
>  Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> NameError: name 'hello' is not defined
> >>>

What you are doing above is typing "python", then - IN python - typing
"hello.py". This does not work, since you're in the interpreter and
the function "hello.py" is unknown to Python.

So try again: "python hello.py" in the command interpreter. Or if you
are in the python interpreter, you might try "import hello" and see
what happens.


-- 
- Rikard - http://bos.hack.org/cv/
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to