New guy question

Sheila King sheila at spamcop.net
Sat Jun 9 23:12:39 EDT 2001


On Sun, 10 Jun 2001 02:59:17 GMT, "Glen Mettler" <Glen.Mettler at home.com>
wrote in comp.lang.python in article
<9oBU6.128578$I5.32912060 at news1.rdc1.tn.home.com>:

:> Based on the '>>>' prefix It looks like you're entering this into the
:> python interpreter.  In that context, to get the same behaviour, you
:> would probably want to do something like "execfile('alook.py')"  Try
:> running "python alook.py" from the shell/dos command prompt, instead.
:> It might be helpful to work through a tutorial.  The one at
:> www.python.org/doc/tut is pretty good, imo.
:>
:> Alex.
:
:Actually, I am working thru a tutorial right now.  I don't recall it saying
:anything about the differences between the DOS window and the IDLE window.
:In any case, I went to the DOS window and this is what I get:
:
:>>> python alook.py
:   File "<stdin>", line 1
:       python alook.py
:                        ^
:SyntaxError:  invalid syntax
:>>>
:
:Glen

You are not in a DOS window if you have the
>>>

which is what D-man was trying to tell you. If you went to the Start
Menu, and then Programs, and then Python, and then DOS Window, that puts
you in the Python Interpreter within a DOS Window.

Do this:
Go to the Start Menu
Go to Programs
Go to MS-DOS prompt

This will open a small window with a mostly black background. You should
not see the
>>>

Instead, you will see something like

C:\Windows\Programs>

or something like that

at the prompt above, type

python alook.py

and then see what happens.

--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/





More information about the Python-list mailing list