title: IronPython: How to access trace back local variables
body: <pre><code>private ScriptEngine pe;
  private ScriptScope scope;
  
  private void button1_Click(object sender, EventArgs e)
  {
      pe = Python.CreateEngine();
      scope = pe.CreateScope();
  
      pe.Runtime.SetTrace(OnTraceback);
      pe.Execute(@"
  def square(x):
    s = x*x
    return s
  
  a = square(2) + (3)
  print ""hello world "" + str(a)
  ", scope);
  }
  
  private TracebackDelegate OnTraceback(TraceBackFrame frame, string result, object payload)
  {
      //How can I access the local variables of the current function?
  
      return OnTraceback;
  }
  </code></pre>
  
  <p>Let me repeat: I want to get the local variables of the function, where the python execution currently is (the function surrounding line <code>frame.f_lineno</code>).</p>