error: ImportError: dynamic module does not define init function (initASSEMBLYNAME)
when loading a mixed managed c++ library that i use as .net wrapper for my object model, i get
import QuenceNET Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: dynamic module does not define init function (initQuenceNET)
does anyone have specific background information on that error and how i can avoid it? there is no problem using the assembly in .net. i was trying to import the library after changing to the directory where the dll is located. -- Leonard Ritter -- paniq@gmx.net -- http://www.quence.com -- http://www.paniq.de
when loading a mixed managed c++ library that i use as .net wrapper for my object model, i get
import QuenceNET Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: dynamic module does not define init function (initQuenceNET)
does anyone have specific background information on that error and how i can avoid it?
there is no problem using the assembly in .net. i was trying to import the library after changing to the directory where the dll is located.
I think you just need to change it to 'import CLR.QuenceNET' The 'CLR' prefix is important, as that is how the runtime is able to distinguish managed imports from plain Python imports. If you don't go through CLR, the standard Python importer will try to import the dll as a Python C extension (which gives the error you're seeing). Hope this helps, Brian Lloyd brian@zope.com V.P. Engineering 540.361.1716 Zope Corporation http://www.zope.com
participants (2)
-
Brian Lloyd
-
Leonard :paniq: Ritter