[IronPython] Preloading An Engine Instance With References

Tomas Matousek Tomas.Matousek at microsoft.com
Mon Aug 10 07:49:03 CEST 2009


You can load assemblies to the runtime via ScriptRuntime.LoadAssembly.

Tomas

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jesse Wiles
Sent: Sunday, August 09, 2009 10:17 PM
To: users at lists.ironpython.com
Subject: [IronPython] Preloading An Engine Instance With References

Hi,

I would like to preload an engine instance with references to .NET namespaces, such that using clr.AddReference in a script is unnecessary.  To be simple, I've created an engine instance with all the scope variables that I want, but within a script executed by the instance, I am finding that clr.AddReference('System') is required to import System.  Can I handle the adding of the reference in the construction of the engine instance and if so, how?

Thanks,
Jesse Wiles
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




More information about the Ironpython-users mailing list