"Laszlo Zsolt Nagy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 
news:[EMAIL PROTECTED]
| vincent wehren wrote:
|
| >"Laszlo Zsolt Nagy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
| >news:[EMAIL PROTECTED]
| >| 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
| >
| >
| Thanks. I set my system environment variable 'PATH' to this:
|
| 
C:\Python24;C:\Python24\DLLs;c:\Python24\Lib\site-packages\win32;c:\oracle\product\10.1.0\db_1\bin;c:\oracle\product\10.1.0\db_1\jre\1.4.2\bin\client;c:\oracle\product\10.1.0\db_1\jre\1.4.2\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program
| Files\Common Files\GTK\2.0\bin
|
| Then I restarted my computer. It is still missing initzlib. :-(
| Please note that I can run the same program as an application, logged in
| as the same user.
|
|  Les

Changing the Windows dll search path doesn't make any difference. It is 
sys.path (Python's search path) that's causing you the headache. Please see 
the mentioned thread for proposed solutions.


Regards,
--

Vincent Wehren 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to