PEP 271: Prefixing sys.path by command line option

Jesse W jessw at loop.com
Tue Oct 2 01:05:26 EDT 2001


Dear Pythonics,
Frederic Giacometti wrote:
<snip>
> The purpose of the PEP is the introduction of new command line option
> to python (-P), whose role would be similar to java's -classpath
> option: providing the ability to explicitly set the PYTHONPATH value
> from the command line.
<snip>
> Last, the -P option can also be used to expose in the scripts the
> value of PYTHONPATH in a highly readable manner.
This seems to me to be a very good idea.  The difficulties I have
had and heard about when dealing with PYTHONPATH are too
numerous to count. Having a way to set it simply would be a 
godsend.
	I just remembered the trick of setting the sys.path var in the 
program, and I do realise that that does work, but it seems like a 
really nasty hack.
> Typical applications are in development of build, test, and
> configuration scripts.
> 
> Comments and suggestions for improvement, and questions are welcome.
Yes, +1,  Full speed ahead...
> Thanks!
Thank you.

				Jesse W




More information about the Python-list mailing list