This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mkc
Recipients
Date 2003-04-25.19:57:06
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Under Tru64 (version 5.1a, and probably others), when a
Python script is structured like so:

    #!/something/bin/python
    import sys
    print sys.prefix

the calculation of prefix in getpath.c won't work
correctly.  The reason is that argv[0] will be 'python'
rather than '/something/bin/python' (as it would be
under, say, Linux).

The code happens to work correctly in some simple
scenarios, but fails in a pretty mysterious way if one
has a different python in one's PATH than the one in
the #! line.  So, for example, if my PATH=/usr/bin and
there is a /usr/bin/python, then if I run the script
above, sys.prefix will be set to '/usr' instead of
'/something' and the wrong module path will be set up, etc.

It would be much better to simply obey the compiled
PREFIX instead, at least in the case where argv[0] has
no slashes.
History
Date User Action Args
2008-01-20 09:56:04adminlinkissue727732 messages
2008-01-20 09:56:04admincreate