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 pitrou
Recipients akr, barry, benjamin.peterson, dmalcolm, glyph, gregory.p.smith, iankko, loewis, pitrou, psss, r.david.murray, thoger
Date 2010-05-21.09:29:01
SpamBayes Score 1.4904235e-06
Marked as misclassified No
Message-id <1274434139.3145.5.camel@localhost.localdomain>
In-reply-to <1274427168.33.0.755358354327.issue5753@psf.upfronthosting.co.za>
Content
> Absolute path to the directory where script is located.  And I believe
> there's no absolute path guarantee for platforms without realpath /
> GetFullPathName.

Yes, this is more precise indeed. As for realpath(), I would expect it
to be present on modern Unices (man page says "4.4BSD, POSIX.1-2001").

> 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.

I suppose 
  PyRun_SimpleString("import sys; sys.path.pop(0)\n");
would be better.
Thanks for the comments, I'll update the patch.
History
Date User Action Args
2010-05-21 09:29:04pitrousetrecipients: + pitrou, loewis, barry, gregory.p.smith, benjamin.peterson, glyph, psss, r.david.murray, iankko, akr, thoger, dmalcolm
2010-05-21 09:29:02pitroulinkissue5753 messages
2010-05-21 09:29:01pitroucreate