Message233216
This patch allows specifying import searchpaths as `-p path` arguments to the interpreter, without touching environment variables.
Avoiding environment variables simplifies a script of mine and is a portable way of swapping module implementation without touching the importing script.
e.g.
# python -p ~/.bin/customlib -p ~/.bin/other script.py
is equivalent to
# PYTHONPATH=~/.bin/customlib:~/.bin/other:$PYTHONPATH python script.py
similarly to
# ghci -i.bin/customlib:.bin/other foo.hs
It is implemented by prepending the arguments to sys.path in Py_Main just after Py_Initialize is called. |
|
Date |
User |
Action |
Args |
2014-12-30 19:10:31 | c2621566 | set | recipients:
+ c2621566 |
2014-12-30 19:10:31 | c2621566 | set | messageid: <1419966631.84.0.639997296504.issue23135@psf.upfronthosting.co.za> |
2014-12-30 19:10:31 | c2621566 | link | issue23135 messages |
2014-12-30 19:10:31 | c2621566 | create | |
|