zlib + Windows 32 service problem (ImportError)

vincent wehren vincent at visualtrans.de
Mon Aug 15 13:57:46 EDT 2005


"Laszlo Zsolt Nagy" <gandalf at geochemsource.com> schrieb im Newsbeitrag 
news:mailman.3098.1124117300.10512.python-list at python.org...
| Sorry, I realized that the import zlib was not executed from my
| (working) service.
| So here is the question: why can't I use zlib from a win32 service? Is
| there any way to make it working?
|
| >-------------
| >Python could not import the service's module
| >  File "T:\Python\Projects\NamedConnector\Service.py", line 17, in ?
| >    from Processor import *
| >  File "c:\Python\Projects\NamedConnector\Processor.py", line 35, in ?
| >    from mess import MessageSocket
| >  File "T:\Python\Lib\mess\MessageSocket.py", line 31, in ?
| >    import zlib
| >exceptions.ImportError: dynamic module does not define init function
| >(initzlib)
| >-------------
|
|
|
I had a similar problem where a zlib.dll that is *not a Python extension* is 
in sys.path *before* zlib.pyd. Python will try to import this zlib.dll and 
find the  dll doesn't export a initzlib:
for more info see 
http://mail.python.org/pipermail/python-list/2004-October/thread.html#248107

HTH,

Vincent Wehren







More information about the Python-list mailing list