It appears that I cannot load any kind of dll into the scripting host. Here is the code that I use to start the script, maybe I have missed something here?
ScriptEngine engine; ScriptScope scope; engine = Python.CreateEngine(); scope = engine.CreateScope(); scope.SetVariable("Console", ctw); scope.SetVariable("ScriptingInterface", TomographicMainForm.GetScriptingInterface ()); ScriptSource source=null ; try { source = engine.CreateScriptSourceFromString(code, SourceCodeKind.Statements ); source.Execute(scope); } From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Brian Ashcroft Sent: Thursday, February 03, 2011 9:00 AM To: users@lists.ironpython.com Subject: [IronPython] Loading a static lib a second time in hosted ironpython Hello, I have an ironpython instance running within my application. This instance is used to control the application. I have a math dll that I reference in the hosting application that I would like to be able to use also in the ironpython scripting. However, I get error messages when I try to add the reference. I have tried the ironpython console (ipy.exe) in the application directory and the dll loads just fine and is completely usable, but when I try the following code in the application, I get an error import clr clr.AddReferenceToFile('MathHelpLib.dll') from MathHelpLib import * With the error: Could not add reference to assembly MathHelpLib
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com