Take the 2-minute tour ×

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
from IronPython.Hosting import PythonCommandLine, PythonConsoleOptions, Python
import System
from Microsoft.Scripting.Hosting.Shell import IConsole

engine = Python.CreateEngine()
runtime = engine.Runtime
for assembly in clr.References:

cmdLine = PythonCommandLine()

cmdLine.Run(engine, my_console(), PythonConsoleOptions())

"my" code is based on this and that.

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

You can do:

engine = Python.CreateEngine({'FullFrames': True})

and the full frames will be enabled. All the other options match up w/ the command line options.

share|improve this answer
add comment

Your Answer


