Message173665
On Posix, it is documented that setting PATH to the empty string is equivalent to not setting PATH at all, which is an exception to the rule that in a string like "/bin::/usr/bin" the empty string in the middle gets interpreted as ".".
PYTHONPATH does not have this exception: an empty PYTHONPATH is interpreted as equivalent to ".".
This difference is not documented. This is a detail, but a possible source of confusion, so I'm reporting it here.
How to reproduce:
file x/x.py: "import z"
file z.py: "print(42)"
The following two lines behave differently (Bash syntax):
PYTHONPATH= python x/x.py
unset PYTHONPATH && python x/x.py
For comparison, if "./foo" is an executable, the following two lines behave identically (neither finds "./foo"):
PATH= foo
unset PATH && foo |
|
Date |
User |
Action |
Args |
2012-10-24 10:37:40 | arigo | set | recipients:
+ arigo |
2012-10-24 10:37:40 | arigo | set | messageid: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> |
2012-10-24 10:37:40 | arigo | link | issue16309 messages |
2012-10-24 10:37:40 | arigo | create | |
|