2 ms·
If I understand the article correctly, it won't do that unless another condition (misconfigured PYTHONPATH) is also met.
by tgsovlerkhgsel 6y ago
If I understand the article correctly, it won't do that unless another condition (misconfigured PYTHONPATH) is also met.
- kgwgk 6y agoThat's not what the article says. The part about PYTHONPATH comes later and points to a different issue. When you run a script, the location of the script is added to the path. # cat > /tmp/test.py import sys print(sys.path) ^D # /usr/bin/python /tmp/test.py ['/private/tmp', .....] And when you don't, the current directory is added to the path. # cd /tmp # /usr/bin/python >>> import test ['', .....]