[Python-Dev] PEP 273: Import Modules from Zip Archives

Mark Hammond MarkH@ActiveState.com
Wed, 7 Nov 2001 22:41:32 +1100


Sorry for the delay:

Jim writes:

> On Windows, the directory is the directory of sys.executable.

Any chance this can be in sys.prefix, else the directory of sys.executable
if sys.prefix is empty?

The reason is for embedding situations - sys.executable may not be a
reasonable watermark.  We recently had a bug regarding os.popen() on Windows
for the exact same reason, and a patch was recently checked in that goes to
great lengths to ensure sys.prefix is always valid even in these embedding
situations.

Mark.