2.5a1 import of .dlls
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

2.5a1 import of .dlls

From: <sven.nystrom@gmail.com>
Date: Tue Apr 18 2006 - 21:13:27 CEST

I've re-built an extension module (as a .dll) using the 2.5a1 release.
Unexpectedly, I'm not able to simply import it (not the way I can when
building it for 2.3). Using imp.load_dynamic() the import succeeds.

>>> import minx # Implemented in a .dll - fails
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named minx
>>> import imp # Workaround
>>> import os
>>> minx = imp.load_dynamic('minx', os.getcwd() + '\\minx.dll')
>>>

I couldn't find anything to indicate this is by design in 2.5a1 (I did
read the PEP 328: Absolute and Relative Imports) - am I doing something
wrong?
Received on Sun Apr 30 23:32:00 2006