[IronPython] DLR Hosting, Access to .NET Types

Curt Hagenlocher curt at hagenlocher.org
Fri Apr 18 05:39:49 CEST 2008


On Thu, Apr 17, 2008 at 8:33 PM, David Seruyange <idmkid at yahoo.com> wrote:
>
> Are all framework types accessible from a hosted engine?  While the module
> loads fine using the above code, a reference to the StringBuilder (which
> works fine when executing a file that references the module) produces an
> error "name StringBuilder not defined." (The module does have a "from
> System.Text import *") -

The console does the equivalent of the following:

    runtime.LoadAssembly(typeof(string).Assembly);
    runtime.LoadAssembly(typeof(System.Diagnostics.Debug).Assembly);

You'll need to execute similar code if you want to access the same assemblies

--
Curt Hagenlocher
curt at hagenlocher.org



More information about the Ironpython-users mailing list