How can I call an IronPython function from within Python? Is there an easy way to interface the two. I need the flexibility of both a full set of proper Python libraries that are not available in IronPython and the latest CLR which Python .net does not currently have.
What I've tried so far is to compile a IronPython dll but I can't get it to be loaded properly within Python.
My attempt to make IronPython n callable from Python
foo.py
def foo():
print 'hello world'
compile_ipy.py
import clr
clr.CompileModules("foo.dll", "foo.py")
My attempt's to call Iron Python From Python
call_ipy_from_py1.py
import ctypes
dll = ctypes.WindDLL('foo.dll')
dll.foo() # AttributeError: function 'foo' not found
call_ipy_from_py2.py
import ctypes
dll = ctypes.cdll.LoadLibrary('foo.dll')
dll.foo() # AttributeError: function 'foo' not found