Title: Ability to specify the PYTHONPATH via a command line flag
Type: Stage:
Components: Versions:
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Arfrever, asvetlov, brian.curtin, eric.snow, gregory.p.smith, littleq0903, mdengler, migel.k, python-dev, ronaldoussoren
Priority: normal Keywords:

Created on 2012-08-17 00:40 by gregory.p.smith, last changed 2014-04-12 10:40 by migel.k.

Messages (8)
msg168429 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2012-08-17 00:40
I'd like a command line flag to override PYTHONPATH.  It could also be used in combination with -E so that you could still set the PYTHONPATH while ignoring everything else from the environment.
msg168496 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2012-08-18 06:04
Would issue14803 be sufficient?  Certainly not quite as concise, but deferring to that solution would limit the proliferation of command-line arguments to the interpreter.
msg168877 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-08-22 12:40
New changeset 526c6262d91f by Ronald Oussoren in branch '3.2':
Fix for issue 15716: interpreter could crash when PYTHONEXECUTABLE was set on Mac OS X.

New changeset ae51329f9893 by Ronald Oussoren in branch 'default':
Fix for issue 15716: interpreter could crash when PYTHONEXECUTABLE was set on Mac OS X.
msg168879 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2012-08-22 12:44
My fingers are too thick. The two changesets in msg168877 are for issue 15761, not this one. Sorry about the noise.
msg169245 - (view) Author: Colin Su (littleq0903) * Date: 2012-08-28 01:54
Could anyone provide some properly command line usage for this issue?

ex. python -P "path_1:path_2:path_3"

I think this point need to be discussed :D
msg169246 - (view) Author: Colin Su (littleq0903) * Date: 2012-08-28 01:54
s/properly/proper (typo)
msg169247 - (view) Author: Colin Su (littleq0903) * Date: 2012-08-28 02:03
started working on it :)
msg176510 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2012-11-28 05:01
Colin - it should work in the same way that setting PYTHONPATH as an environment variable would work, e.g., semi-colon is the separator on Windows.
Date User Action Args
2014-04-12 10:40:55migel.ksetnosy: + migel.k
2012-11-28 13:46:19mdenglersetnosy: + mdengler
2012-11-28 08:24:19asvetlovsetnosy: + asvetlov
2012-11-28 05:01:46brian.curtinsetnosy: + brian.curtin
messages: + msg176510
2012-08-28 02:03:14littleq0903setmessages: + msg169247
2012-08-28 01:54:52littleq0903setmessages: + msg169246
2012-08-28 01:54:13littleq0903setmessages: + msg169245
2012-08-28 01:45:36littleq0903setnosy: + littleq0903
2012-08-22 12:44:26ronaldoussorensetnosy: + ronaldoussoren
messages: + msg168879
2012-08-22 12:40:54python-devsetnosy: + python-dev
messages: + msg168877
2012-08-18 13:31:47Arfreversetnosy: + Arfrever
2012-08-18 06:04:41eric.snowsetmessages: + msg168496
2012-08-17 01:47:27eric.snowsetnosy: + eric.snow
2012-08-17 00:40:26gregory.p.smithcreate