I have found something that works, thanks to you :-).
Given an IronPython assembly "mymodule.dll" with the function "myFunction"
eng = Python.CreateEngine()
eng.runtime.LoadAssembly(Assembly.Load("mymodule"));
ScriptScope scope = eng.CreateScope();
cmd = "from mymodule import myFunction"
eng.CreateScriptSourceFromString(cmd).Execute(scope);
//Get the interpretMapping function
Func<string, object> myFunction;
interpretMapping = scope.GetVariable<Func<string, object>>("myFunction");
ObjectOperations ops = eng.Operations;
object bar = myFunction("foo");
object method = ops.GetMember(item, "myMethod");
ops.Call(method);
Thanks for your patience and your answers.
--
Renaud Durand
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com