Message106221
> 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. |
|
Date |
User |
Action |
Args |
2010-05-21 09:29:04 | pitrou | set | recipients:
+ pitrou, loewis, barry, gregory.p.smith, benjamin.peterson, glyph, psss, r.david.murray, iankko, akr, thoger, dmalcolm |
2010-05-21 09:29:02 | pitrou | link | issue5753 messages |
2010-05-21 09:29:01 | pitrou | create | |
|