2001-09-13 12:46:44 -04:00
|
|
|
|
PEP: 271
|
|
|
|
|
Title: Prefixing sys.path by command line option
|
|
|
|
|
Version: $Revision$
|
|
|
|
|
Last-Modified: $Date$
|
2006-03-02 14:54:50 -05:00
|
|
|
|
Author: fred@arakne.com (Frédéric B. Giacometti)
|
2001-09-26 01:01:24 -04:00
|
|
|
|
Status: Rejected
|
2001-09-13 12:46:44 -04:00
|
|
|
|
Type: Standards Track
|
|
|
|
|
Created: 15-Aug-2001
|
|
|
|
|
Python-Version: 2.2
|
|
|
|
|
Post-History:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Abstract
|
|
|
|
|
|
|
|
|
|
At present, setting the PYTHONPATH environment variable is the
|
|
|
|
|
only method for defining additional Python module search
|
|
|
|
|
directories.
|
|
|
|
|
|
|
|
|
|
This PEP introduces the '-P' valued option to the python command
|
|
|
|
|
as an alternative to PYTHONPATH.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rationale
|
|
|
|
|
|
|
|
|
|
On Unix:
|
|
|
|
|
|
|
|
|
|
python -P $SOMEVALUE
|
|
|
|
|
|
|
|
|
|
will be equivalent to
|
|
|
|
|
|
|
|
|
|
env PYTHONPATH=$SOMEVALUE python
|
|
|
|
|
|
|
|
|
|
On Windows 2K:
|
|
|
|
|
|
|
|
|
|
python -P %SOMEVALUE%
|
|
|
|
|
|
|
|
|
|
will (almost) be equivalent to
|
|
|
|
|
|
|
|
|
|
set __PYTHONPATH=%PYTHONPATH% && set PYTHONPATH=%SOMEVALUE%\
|
|
|
|
|
&& python && set PYTHONPATH=%__PYTHONPATH%
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Other Information
|
|
|
|
|
|
|
|
|
|
This option is equivalent to the 'java -classpath' option.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
When to use this option
|
|
|
|
|
|
|
|
|
|
This option is intended to ease and make more robust the use of
|
|
|
|
|
Python in test or build scripts, for instance.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reference Implementation
|
|
|
|
|
|
2001-09-13 14:41:35 -04:00
|
|
|
|
A patch implementing this is available from SourceForge:
|
|
|
|
|
|
|
|
|
|
http://sourceforge.net/tracker/download.php?group_id=5470&atid=305470&file_id=6916&aid=429614
|
2001-09-13 12:46:44 -04:00
|
|
|
|
|
2001-09-13 14:41:35 -04:00
|
|
|
|
with the patch discussion at:
|
|
|
|
|
|
|
|
|
|
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=429614&group_id=5470
|
|
|
|
|
|
2001-09-13 12:46:44 -04:00
|
|
|
|
|
|
|
|
|
Copyright
|
|
|
|
|
|
|
|
|
|
This document has been placed in the public domain.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Local Variables:
|
|
|
|
|
mode: indented-text
|
|
|
|
|
indent-tabs-mode: nil
|
2006-03-02 14:54:50 -05:00
|
|
|
|
sentence-end-double-space: t
|
2001-09-13 12:46:44 -04:00
|
|
|
|
fill-column: 70
|
2006-03-02 14:54:50 -05:00
|
|
|
|
coding: utf-8
|
2001-09-13 12:46:44 -04:00
|
|
|
|
End:
|