Author thoger
Recipients akr, barry, benjamin.peterson, dmalcolm, glyph, gregory.p.smith, iankko, loewis, pitrou, psss, r.david.murray, thoger
Date 2010-05-21.07:32:35
SpamBayes Score 1.5343e-05
Marked as misclassified No
Message-id <1274427168.33.0.755358354327.issue5753@psf.upfronthosting.co.za>
In-reply-to
Content
+   - If the name of an existing script is passed in ``argv[0]``, its absolute
+     path is prepended to :data:`sys.path`

Absolute path to the directory where script is located.  And I believe there's no absolute path guarantee for platforms without realpath / GetFullPathName.

Should the documentation also give some guidance to those that embed python and don't want to start using SetArgvEx right away and break compatibility with older python versions?  Something like:

If you're embedding python in your application, using SetArgv and don't want modified sys.path, call PyRun_SimpleString("sys.path.pop(0)\n"); after SysArgv to unconditionally drop the first sys.path argument added by SetArgv.
History
Date User Action Args
2010-05-21 07:32:48thogersetrecipients: + thoger, loewis, barry, gregory.p.smith, pitrou, benjamin.peterson, glyph, psss, r.david.murray, iankko, akr, dmalcolm
2010-05-21 07:32:48thogersetmessageid: <1274427168.33.0.755358354327.issue5753@psf.upfronthosting.co.za>
2010-05-21 07:32:36thogerlinkissue5753 messages
2010-05-21 07:32:35thogercreate