>
> What did i do wrong?
>
You should ask these kind of questions in the Python general list:
http://www.python.org/mailman/listinfo/python-list
This Python-3000 list is about developing Python 3 *itself*, not
developing *in* Python
Regards,
--
. Facundo
Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/
_______________________________________________
Python-3000 mailing list
Pytho...@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: http://mail.python.org/mailman/options/python-3000/python-3000-garchive-63646%40googlegroups.com
You do know you can run the file from within IDLE by just pressing F5, right?
>
> -> and then start -> programs -> python 3.0 -> Python (command line) ->
>
> Python 3.0rc3 (r30rc3:67313, Nov 21 2008, 07:14:45) [MSC v.1500 32 bit
> (Intel)]
> on win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>>
>
> -> i wrote "helloworld.py"
No! Wrong! See below.
> without quotes -> it gives NameError ->
>
> Python 3.0rc3 (r30rc3:67313, Nov 21 2008, 07:14:45) [MSC v.1500 32 bit
> (Intel)]
> on win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> helloworld.py
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> NameError: name 'helloworld' is not defined
>>>>
>
> What did i do wrong?
As I believe someone pointed out earlier when you previously asked
this question on one of the other mailinglists, to do what you want to
do, you should:
1. Go Start -> Run, enter "cmd", click Run, to open the DOS shell.
2. cd to whatever folder helloworld.py is located in
3. running the following command in the terminal window: python helloworld.py
Python's "shell" is an interactive interpreter of Python *code*, and
is NOT used to run python script *files*, at least in the particular
way you're trying.
When you enter "helloworld.py" at the Python interpreter prompt,
Python is not trying to run the file "helloworld.py"; it's looking for
a variable named "helloworld" to then find the "py" attribute of (i.e.
the dot is an operator in this instance). Since there's obviously no
such variable, it's raising a NameError exception.
For simplicity, I'd recommend just running the script directly from
IDLE as I explained above.
Finally, I echo the comment that your question is completely offtopic
for this mailinglist, which is about developing Python 3.0, not using
Python 3.0 (unless you found a bug, which is not the case here).
Cheers,
Chris
--
Follow the path of the Iguana...
http://rebertia.com
>
> ________________________________
> Discover the new Windows Vista Learn more!
> _______________________________________________
> Python-3000 mailing list
> Pytho...@python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe:
> http://mail.python.org/mailman/options/python-3000/cvrebert%40gmail.com