Actually if this is a Python-based swig DLL then it won't work at all.
IronPython does not support loading of CPython based modules as of yet.
You'd have to ask the team if this is eventually planned.

Trying to do so will result in:

>>> from pyogre import ogre
Traceback (most recent call last):
  File , line 0, in <stdin>##37
  File [snip]\IronPython-1.0-Beta9\Lib\pyogre\ogre.py, line 4, in
Initialize
  File , line 0, in __import__##7
ImportError: No module named _ogre

Since IronPython can't load .pyd files.

If swig was used to generate a C# library (instead of a Python library),
then it can be compiled into a DLL assembly and loaded exactly as Dino
says below...

-Lee



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dino Viehland
Sent: Tuesday, July 25, 2006 5:43 PM
To: Discussion of IronPython
Subject: Re: [IronPython] IronPython and Swig

You'll need to tell us about the DLL first:

import clr
clr.AddReference('_myDll')
import someNamespaceOrTypeFrom_myDll

then we'll be able to load types & namespaces from it.

________________________________________
From: [EMAIL PROTECTED] On Behalf Of Lyle Thompson
Sent: Tuesday, July 25, 2006 5:42 PM
To: [email protected]
Subject: [IronPython] IronPython and Swig

Hi All,

I have a C++ DLL that I wrapped with Swig. Inside the python wrapper it
imports the DLL, i.e. "import _myDll". In IronPython, I get the error:

ImportError: No Module named _myDll.

I have made sure that the directory with my DLL is in both my PATH and
PYTHONPATH.

Does IronPython not support this usage of the import statement?

Thanks,
Lyle

_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to