Newbie question

Remco Gerlich scarblac at
Mon May 21 09:02:10 EDT 2001

Patrick Kirk <pknews at> wrote in comp.lang.python:
> I have read that Python is a good first language so I downloaded it and am
> wading through a tutorial.  But I'm having silly problems that I can't work
> out.
> I run Win2k.  Python is in a folder called d:\python.  also in there is a
> file called
> At the command prpmpt, I cd to d:\python run python and enter python
> Error message is:
> >>> python
>   File "<stdin>", line 1
>     python
>             ^
> SyntaxError: invalid syntax
> >>>
> Clearly I'm doing something wrong but what?

"python" is a command to run at the command prompt, i.e. *instead of*
running Python the normal way. It's a DOS command.
You want

D:\python> python

Also, you may get a problem because '1' isn't a valid name for a module. If
you rename it to you'll get fewer problems later on.

On the Python prompt, you can run it with

>>> import one

(if it's called - 'import 1' isn't possible)

Anything in it (like a variable called 'var') can then be accessed:

>>> print one.var

But that's probably later on in the Tutorial.

If you're using the official tutorial as a programming newbie and find it
tough going, note that there are also a few especially for non-programmers,
ie .

Remco Gerlich

More information about the Python-list mailing list