Python search path (on Windows)

Ant antroy at gmail.com
Wed Oct 22 08:07:53 EDT 2008


On Oct 22, 10:03 am, "wooly booly" <w... at noname.com> wrote:
> I would like to execute a Python script from Windows command line:
>
> Python myscript.py
>
> This works if myscript.py resides in the current folder. My question is:
> Is it possible to execute the command above from another folder?
>
> I put the script's folder in the PYTHONPATH environment variable but this
> didn't help.
>
> Thanks for your help!

You can put the script directory in the PATH environment variable, and
call it with just:

myscript.py



More information about the Python-list mailing list