[issue7774] sys.executable: wrong location if zeroth command argument is modified.
STINNER Victor
report at bugs.python.org
Thu Mar 11 12:30:35 CET 2010
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
getpath.patch: another patch written by flox. If argv[0] is set to a non existent program name, sys.executable is set to an empty string instead of a directory name.
Example of the bug with Python 2.5:
$ sh -c "exec -a xxx python -c 'import sys, os; print repr(sys.executable), repr(os.getcwd())'"
'/home/haypo/' '/home/haypo'
----------
Added file: http://bugs.python.org/file16523/getpath.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7774>
_______________________________________
More information about the Python-bugs-list
mailing list