Florent Xicluna <[email protected]> added the comment:
It may help to find other methods:
http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe
By the way, it should not "absolutize" the path when sys.executable is
irrelevant. IMHO, it should render an empty thing in such case (code below).
--- Modules/getpath.c (revision 77750)
+++ Modules/getpath.c (working copy)
@@ -441,7 +441,7 @@
}
else
progpath[0] = '\0';
- if (progpath[0] != SEP)
+ if (progpath[0] != SEP && progpath[0] != '\0')
absolutize(progpath);
strncpy(argv0_path, progpath, MAXPATHLEN);
argv0_path[MAXPATHLEN] = '\0';
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue7774>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com