title: Call IronPython from standard Python
body: <p>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.</p>
  
  <p>What I've tried so far is to compile a IronPython dll but I can't get it to be loaded properly within Python.</p>
  
  <p>My attempt to make IronPython n callable from Python</p>
  
  <p><strong>foo.py</strong></p>
  
  <pre><code>def foo():
      print 'hello world'
  </code></pre>
  
  <p><strong>compile_ipy.py</strong></p>
  
  <pre><code>import clr
  clr.CompileModules("foo.dll", "foo.py")
  </code></pre>
  
  <p>My attempt's to call Iron Python From Python</p>
  
  <p><strong>call_ipy_from_py1.py</strong></p>
  
  <pre><code>import ctypes
  dll = ctypes.WindDLL('foo.dll')
  dll.foo() # AttributeError: function 'foo' not found
  </code></pre>
  
  <p><strong>call_ipy_from_py2.py</strong></p>
  
  <pre><code>import ctypes
  dll = ctypes.cdll.LoadLibrary('foo.dll')
  dll.foo() # AttributeError: function 'foo' not found
  </code></pre>