[Tutor] Running a script not in the current directory

Arvind Raghavan arvind at arraycomm.com
Thu Aug 25 20:02:35 CEST 2005


I'm using an XP platform and have both a Windows and Cygwin installation 
of Python. I store all my Python scripts in one directory, but would 
like to invoke the script from the command line without specifying the 
full path to this directory. i.e.,

Say all my scripts are in:

~/py_scripts/

My current directory is:
~

I want to be able to do this:

prompt>python myscript.py

and not:
prompt>python ~/py_scripts/myscript.py

Any way to do this? (I use PYTHONPATH for modules and that works correctly)

Arvind


More information about the Tutor mailing list