Permalink
Cannot retrieve contributors at this time
72 lines (43 sloc)
1.43 KB
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
peps/pep-0271.txt
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PEP: 271 | |
| Title: Prefixing sys.path by command line option | |
| Author: Frédéric B. Giacometti <fred@arakne.com> | |
| Status: Rejected | |
| Type: Standards Track | |
| Content-Type: text/x-rst | |
| 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 | |
| ======================== | |
| A patch implementing this is available from SourceForge:: | |
| http://sourceforge.net/tracker/download.php?group_id=5470&atid=305470&file_id=6916&aid=429614 | |
| with the patch discussion at:: | |
| http://sourceforge.net/tracker/?func=detail&atid=305470&aid=429614&group_id=5470 | |
| Copyright | |
| ========= | |
| This document has been placed in the public domain. |