<span class="Apple-style-span" style="border-collapse: collapse; "><div>Hi all and many thanks to Dino Viehland for answering my previous question re: sys.builtin_module_names and embedding.</div><div><br></div><div>I am trying to use the IronPython profiler (<a href="http://blogs.msdn.com/curth/archive/2009/03/29/an-ironpython-profiler.aspx">http://blogs.msdn.com/curth/archive/2009/03/29/an-ironpython-profiler.aspx</a>) from an embedded interpreter but cannot figure out how to pass the -X:EnableProfiler to my ScriptEngine instance. </div>
<div><br></div><div><div> _engine = Python.CreateEngine();</div><div> Debug.WriteLine(_engine.Runtime.Setup.HostArguments.IsReadOnly);</div><div> // prints True</div><div><br></div></div><div> _engine.Runtime.Setup.HostArguments.Add("-X:EnableProfiler") </div>
<div> // throws an System.NotSupportedException</div><div><br></div><div>How do I set up the Runtime.Setup.HostArguments before calling Python.CreateEngine()?</div></span><br>/Mads