[Ironpython-users] Latest status on ctypes?

Jeff Hardy jdhardy at gmail.com
Mon Mar 4 22:47:02 CET 2013


On Mon, Mar 4, 2013 at 1:01 PM, Doug Blank <doug.blank at gmail.com> wrote:
> Wondering what the status is on ctypes with IronPython. I had an older
> version of ctypes.py that was referencing a previous dll:
>
> ImportError: No module named IronPython.Runtime.Calls
>
> The CPython 2.7 ctypes directory doesn't load:
>
> python>>> import ctypes
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "/home/dblank/Calico/trunk/bin/Lib/ctypes/__init__.py", line
> 441, in <module>
>   File "/home/dblank/Calico/trunk/bin/Lib/ctypes/__init__.py", line
> 353, in __init__
> OSError: IronPython.Runtime.Exceptions.OSException: cannot load library
>   at IronPython.Modules.CTypes.LoadLibrary (System.String library,
> Int32 mode) [0x00000] in <filename unknown>:0
>   at IronPython.Modules.CTypes.dlopen (System.String library, Int32
> mode) [0x00000] in <filename unknown>:0
>   at Microsoft.Scripting.Interpreter.FuncCallInstruction`3[System.String,System.Int32,System.Object].Run
> (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x00000] in
> <filename unknown>:0
>   at Microsoft.Scripting.Interpreter.Interpreter.Run
> (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x00000] in
> <filename unknown>:0
>
> Any info would be useful; thanks!

It looks like you're on a Unix box. I'm pretty sure IronPython ctypes
has only ever been tested on Windows, so it could have some
platform-specific dependencies. If you could figure out what library
it's failing to load, that might help sort it out. Make sure you're
using IronPython's copy of the stdlib as well, since it may have some
modifications to make it work.

- Jeff


More information about the Ironpython-users mailing list