I am hosting IronPython within IronPython. I did not find the way to initialize it with the equivalent of the command line argument: -X:FullFrames
.
My code is somewhat like that:
import clr
clr.AddReference('IronPython')
clr.AddReference('Microsoft.Scripting')
from IronPython.Hosting import PythonCommandLine, PythonConsoleOptions, Python
clr.AddReference('Microsoft.Dynamic')
clr.AddReference('System')
import System
from Microsoft.Scripting.Hosting.Shell import IConsole
engine = Python.CreateEngine()
runtime = engine.Runtime
for assembly in clr.References:
runtime.LoadAssembly(assembly)
cmdLine = PythonCommandLine()
runtime.Globals.SetVariable('cur_cmdLine',cmdLine)
cmdLine.Run(engine, my_console(), PythonConsoleOptions())