If "a" is an Assembly object, you should just be able to dot into it to get Types. So instead of<div><br></div><div>clr.AddReference(a)</div><div>from A.B.C.D import E</div><div><br></div><div>you'd say</div>
<div>E = a.A.B.C.D.E</div><div><br></div><div>The Python import mechanism is global and not really consistent with having multiple "things" with the same name.<br><br><div class="gmail_quote">On Mon, Apr 20, 2009 at 2:05 PM, Marty Nelson <span dir="ltr"><<a href="mailto:Marty.Nelson@symyx.com">Marty.Nelson@symyx.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p><span style="font-size:10.0pt;color:green">One of our developers asked me this question today, I don’t have
an answer, so any help would be appreciated:</span></p>
<p><span style="font-size:10.0pt;color:green"> </span></p>
<p><span style="font-size:10.0pt">We
came across an issue while testing the NuGenesis extension related to assembly
versioning in scripts. The extension has a custom assembly, which is
called by script:</span></p>
<p><span style="font-size:10.0pt"> </span></p>
<p><span style="font-size:10.0pt">
</span><span style="font-size:10.0pt;font-family:"Courier New"">a =
AssemblyCache.GetAssembly("Symyx.SDMS.NuGenesis.SN6, Version=1.2.3.4,
Culture=neutral, PublicKeyToken=e5750cf9faec8249")</span></p>
<p><span style="font-size:10.0pt;font-family:"Courier New"">
clr.AddReference(a)</span></p>
<p><span style="font-size:10.0pt;font-family:"Courier New"">
from Symyx.SDMS.NuGenesis.SN6 import *</span></p>
<p><span style="font-size:10.0pt"> </span></p>
<p><span style="font-size:10.0pt">We
are adding reference to a version-specific assembly, and then we import from a
namespace inside the assembly.</span></p>
<p><span style="font-size:10.0pt"> </span></p>
<p><span style="font-size:10.0pt">We
have two document templates - each of them calls a different version of the
extension assembly from the script. After opening both templates within
the same Notebook session, both versions of the assembly are in memory, and at
this point the <b>import</b> call seems to import the version that was loaded
the last time (as opposed to the one we reference by version in the script).
Is there a way around this?</span></p>
<p><span style="font-size:10.0pt"> </span></p>
<p><span style="font-size:10.0pt"> </span></p>
<p> </p>
</div>
</div>
<table><tbody><tr><td bgcolor="#ffffff"><font color="#000000">=======<br>
Notice: This e-mail message, together with any attachments, contains<br>
information of Symyx Technologies, Inc. or any of its affiliates or<br>
subsidiaries that may be confidential, proprietary, copyrighted,<br>
privileged and/or protected work product, and is meant solely for<br>
the intended recipient. If you are not the intended recipient, and<br>
have received this message in error, please contact the sender<br>
immediately, permanently delete the original and any copies of this<br>
email and any attachments thereto.<br>
</font></td></tr></tbody></table><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
<br></blockquote></div><br></div>