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 ncoghlan
Recipients Michel Desmoulin, ncoghlan, r.david.murray, vstinner, xtreak, yselivanov
Date 2019-10-20.13:09:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I think that's a valid point regarding sys.argv[0] - it's the import system and code introspection that wants(/needs) absolute paths, whereas sys.argv[0] gets used in situations (e.g. usage messages) where we should retain whatever the OS gave us, since that best reflects what the user entered.

That's straightforward to selectively revert, though: remove the "config->run_filename != NULL" clause at and add a comment with the reason for the deliberate omission.

That way the OS-provided argv entry will continue to be passed through to sys.argv[0], while everywhere else will get the absolute path.
Date User Action Args
2019-10-20 13:09:00ncoghlansetrecipients: + ncoghlan, vstinner, r.david.murray, yselivanov, Michel Desmoulin, xtreak
2019-10-20 13:09:00ncoghlansetmessageid: <>
2019-10-20 13:09:00ncoghlanlinkissue20443 messages
2019-10-20 13:09:00ncoghlancreate