New guy question
Alex Martelli
aleaxit at yahoo.com
Sun Jun 10 10:57:33 EDT 2001
"Glen Mettler" <Glen.Mettler at home.com> wrote in message
news:DfKU6.130092$I5.33794657 at news1.rdc1.tn.home.com...
...
> I went to the MS DOS Prompt ("Command") and typed in python alook.py and
got
> an error message: Bad command or file name.
Then the directory with Python.Exe (e.g. C:\Python21 in a typical
Python 2.1 installation) is not in your PATH. You can remedy this
differently in different versions of Windows. Easiest in NT/2000
(and I assume XP): Start/Settings/Control Panel/System/
Environment -- you'll find a PATH among the user and/or system
environment settings, a list of directories separated by semicolons
(;), and you can add c:\Python21 to it. Easiest in 95/98/ME: edit
c:\Autoexec.bat. It probably already exists and already includes
a PATH statement of a form such as
PATH c:\foo;d:\bar;%PATH%
edit it to
PATH c:\Python21;c:\foo;d:\bar;%PATH%
or if no such statements were there, create one
PATH c:\Python21;%PATH%
Rebooting after such setting-change is not strictly necessary for
NT (it is for 95) but is advisable anyway.
There are alternatives (that involve editing the Windows registry,
for example) but I think they're less simple.
Alex
More information about the Python-list
mailing list