[IronPython] Dynamically import namespace from C# DLL
Danny Fernandez
fernandez.dan at gmail.com
Tue Jul 27 13:36:51 PDT 2010
I am trying to figure out how to import types from a namesapce at run time.
I can do a from ... import * but my goal is only to
to import the types only when I need access to those types from a namespace
and the namespace is not known until it is calculated by
a request.
I tried the simpliest and straightforward
namespace = "A.B.C.TargetNameSpace"
from namespace import *
but that didn't work. I tried to figure out maybe I can leverage
reflection. I was able to get all the types from a given namespace
but I was stuck trying to expose these types to my other parts of my
script. I'm using 2.6.1. with .NET 3.5.
I appreciate any feeback.
Danny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ironpython.com/pipermail/users-ironpython.com/attachments/20100727/e35ad092/attachment.htm>
More information about the Users
mailing list