Looking for the mysterious zlib.py* files in Python 2.6.4 (32-bit) for Windows

python at bdurham.com python at bdurham.com
Fri Mar 5 00:10:06 CET 2010

In the process of building an EXE with py2exe, I noticed that
there's no physical zlib files anywhere on my workstation.

I can import zlib and use this module's features without problem.
But when I query zlib.__file__, I get back an empty string.

Where does the zlib code live? Is zlib a <built-in> in 2.6?

The reason I question its '<built-in>' status is that when
analyzing my 2.6 based Py2exe produced executables with
DependencyWalker, I see references to a zlib.pyd file that
doesn't exist anywhere on my system. I wonder if this is
something I should be concerned about?

Can someone explain this mystery to me?

Thank you,

More information about the Python-list mailing list