[docs] [issue13402] Document absoluteness of sys.executable

Brad Larsen report at bugs.python.org
Mon Jul 11 18:06:12 EDT 2016


Brad Larsen added the comment:

It looks like sys.executable is *not* always an absolute path.  In Python 2.7:

    $ which python2.7
    /opt/local/bin/python2.7
    $ cd /opt/local/bin
    $ ../bin/python2.7 -m 'import sys; print(sys.executable)'
    /opt/local/bin/../bin/python2.7

Also in Python 3.5:

    $ which python3.5
    /opt/local/bin/python3.5
    $ cd /opt/local/bin
    $ ../bin/python3.5 -m 'import sys; print(sys.executable)'
    /opt/local/bin/../bin/python3.5

----------
nosy: +blarsen

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13402>
_______________________________________


More information about the docs mailing list