[IronPython] assembly versioning in scripts

Curt Hagenlocher curt at hagenlocher.org
Tue Apr 21 00:13:29 CEST 2009


If "a" is an Assembly object, you should just be able to dot into it to get
Types.  So instead of
clr.AddReference(a)
from A.B.C.D import E

you'd say
E = a.A.B.C.D.E

The Python import mechanism is global and not really consistent with having
multiple "things" with the same name.

On Mon, Apr 20, 2009 at 2:05 PM, Marty Nelson <Marty.Nelson at symyx.com>wrote:

>  One of our developers asked me this question today, I don’t have an
> answer, so any help would be appreciated:
>
>
>
> 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:
>
>
>
>                                     a =
> AssemblyCache.GetAssembly("Symyx.SDMS.NuGenesis.SN6, Version=1.2.3.4,
> Culture=neutral, PublicKeyToken=e5750cf9faec8249")
>
>                   clr.AddReference(a)
>
>                   from Symyx.SDMS.NuGenesis.SN6 import *
>
>
>
> We are adding reference to a version-specific assembly, and then we import
> from a namespace inside the assembly.
>
>
>
> 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 *import* 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?
>
>
>
>
>
>
>  =======
> Notice: This e-mail message, together with any attachments, contains
> information of Symyx Technologies, Inc. or any of its affiliates or
> subsidiaries that may be confidential, proprietary, copyrighted,
> privileged and/or protected work product, and is meant solely for
> the intended recipient. If you are not the intended recipient, and
> have received this message in error, please contact the sender
> immediately, permanently delete the original and any copies of this
> email and any attachments thereto.
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20090420/44a22033/attachment.html>


More information about the Ironpython-users mailing list