system variables

Peter Hansen peter at
Sun Jun 2 02:08:09 EDT 2002

Daniel Powell wrote:
> hi guys,
> I'm new to python and I'm teaching myself from a website. I'm stumped on one
> thing this is the exact wording
> "You will need to cause the directory containing the file named python.exe
> to be listed in your system environment variable named path."
> the website is
> it says when you do this if you type something like
> "python" it will run the "" scipt
> if anyone can help me do this i would grealty appreciate it.
> My OS is Win 98SE

Hi Daniel.  Edit the file c:\autoexec.bat to modify the PATH statement
that is there so it has the python directory listed in it.  For example,
if it reads

   SET PATH=c:\windows;c:\windows\command

then you should make it this (substituting the appropriate folder in
place of c:\python22 for your own system, depending on where you 
installed Python):

   SET PATH=c:\windows;c:\windows\command;c:\python22

Test this out manually by typing the above line at a DOS prompt,
then typing just "python" (when you are not already in the Python
folder).  If you type "SET" by itself you'll see the current PATH
setting and can adjust the above lines appropriately.

After changing AUTOEXEC.BAT you need to reboot, and then the changes
should be permanent.


More information about the Python-list mailing list