Question

scope.SetVariable("math", ?? typeof(System.Math) ??);

or do I need create a module?

Was it helpful?

Solution

You can do:

scope.SetVariable("math", DynamicHelpers.GetPythonTypeFromType(typeof(System.Math)));

DynamicHelpers is in IronPython.Runtime.Types.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top