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 Arfrever, brett.cannon, eric.araujo, eric.snow, jaraco, ncoghlan, serhiy.storchaka, vinay.sajip
Date 2017-10-21.15:12:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1508598756.98.0.213398074469.issue16737@psf.upfronthosting.co.za>
In-reply-to
Content
Yeah, that one I definitely think could be improved. Could you file a separate RFE suggesting that we update sys.path[0] based on __main__.__spec__.origin after we look up __main__.__spec__?

That way it will only stay as the current directory if the module being executed is in a subdirectory of the current directory, and will otherwise be updated appropriately for wherever we actually found the main module.
History
Date User Action Args
2017-10-21 15:12:37ncoghlansetrecipients: + ncoghlan, brett.cannon, vinay.sajip, jaraco, eric.araujo, Arfrever, eric.snow, serhiy.storchaka
2017-10-21 15:12:36ncoghlansetmessageid: <1508598756.98.0.213398074469.issue16737@psf.upfronthosting.co.za>
2017-10-21 15:12:36ncoghlanlinkissue16737 messages
2017-10-21 15:12:36ncoghlancreate