[python-win32] Can Win32 python load Cygwin-compiled DLLs?

Richard W.M. Jones rjones at redhat.com
Mon Dec 3 19:01:39 CET 2007


I'm trying to seek a definitive answer to the question: Can Win32 python 
load Cygwin-compiled DLLs?

We have a C library (http://libvirt.org/) which has Python bindings. 
Because the library relies on a lot of POSIX stuff we have only got so 
far as to compile it under Cygwin.  Using the Cygwin version of Python I 
can import the library fine.

Now for various reasons[*] I want to take the library (cygvirt.dll) and 
Python bindings (cygvirtmod.dll) and load them into the native Win32 
python.  I discovered from the FAQ that cygvirtmod.dll had to be renamed 
to cygvirtmod.pyd.  However when Win32 python tries to 'import 
cygvirtmod' it just hangs (no CPU, but cannot be killed with ^C).  There 
is no error message.

Is this something that just fundamentally cannot be done, or is there 
something I can do to fix this?

Rich.

[*] 'Various reasons' being I want to use PyGTK without requiring an X 
server.

-- 
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mail.python.org/pipermail/python-win32/attachments/20071203/6dd454ad/attachment.bin 


More information about the python-win32 mailing list