forked from python/peps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpep-0271.txt
85 lines (53 loc) · 1.61 KB
/
pep-0271.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
PEP: 271
Title: Prefixing sys.path by command line option
Version: $Revision$
Last-Modified: $Date$
Author: [email protected] (Frédéric B. Giacometti)
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.
..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End: