Hello,<br><br>We embedded IronPython 1.1 in our application. Unfortunately I am running into problems accessing .NET assemblies in Python.<br><br>In one situation, if I create a module (let's call it mymodule.py) and put it in sys.path, with the following code in it:<br>
<br>import clr<br>clr.AddReference('System')<br>from System.Diagnostics import Process<br><br>def foo():<br> p = Process()<br> return p<br><br>and then send the IronPython interpreter a script that imports mymodule and calls foo(), everything works fine:<br>
<br>import mymodule<br>
p = mymodule.foo()<br><br>However, if
mymodule.py is "packaged" in a subdirectory, let's say "subdir", which
is in the search path as well and has an empty __init__.py file, thinks
break:<br><br>import subdir.mymodule<br>
p = subdir.mymodule.foo() <br><br>I
get: "ImportError: can't find module named Diagnostics". It's as
though the fact that I've "packaged" the module in a directory breaks
the way IronPython gives me bindings to the .NET assemblies... Why
should this break? Am I doing something wrong?<br>
<br>Help!<br><font color="#888888"><br>pj</font>