By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,672 Members | 1,628 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,672 IT Pros & Developers. It's quick & easy.

Possible BUG: Default zip for Windows debug build is

P: n/a

I think there's a bug in the code which builds sys.path for Windows.
The default zip archive file name in the debug build of Python is and not I'm not sure if this is
intentional. The zip import PEP doesn't mention it, nor does it the
code implementing it (PC/getpathp.c)

You can see that on Unix the zip archive name does not depend on the
type of build (or so it says in the PEP below).

If it's a bug it's caused by the fact that the name of the Python DLL
is used and that that name includes _d in the debug build.

PEP 273:
We add one name to sys.path. On Unix, the directory is
sys.prefix + "/lib", and the file name is
"" % (sys.version[0], sys.version[2]).
So for Python 2.2 and prefix /usr/local, the path
/usr/local/lib/python2.2/ is already on sys.path, and
/usr/local/lib/ would be added.
On Windows, the file is the full path to python22.dll, with
"dll" replaced by "zip". The zip archive name is always inserted
as the second item in sys.path. The first is the directory of the (thanks Tim).

Adal Chiriliuc

Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.