Hi all,

Another observation from the Resolver One upgrade:
When we run the following:
        engine = Python.CreateEngine()
        scope = engine.CreateScope()
        script = """
def Fn():
    raise Exception
Fn()
"""
        source = engine.CreateScriptSourceFromString(script, 'aname',
SourceCodeKind.Statements)
        code = source.Compile()
        code.Execute(scope)

We get a stacktrace that looks like this:
  File "stacktrace.py", line 10, in testStackTrace
    code.Execute(scope)
  File "aname", line 4, in aname
  File "aname", line 3, in Fn

The equivalent code in IPy1 and Python 2.5, has
  File "aname", line 4, in <module>
instead of
  File "aname", line 4, in aname


When we don't pass the name into the call to CreateScriptSourceFromString,
we get:
  File "stacktrace.py", line 10, in testStackTrace
    code.Execute(scope)
  File "<string>", line 4, in <module>
  File "<string>", line 3, in Fn

Is there a way for us to get behaviour like IPy1 and Python 2.5? Is this
possibly a bug in the traceback generation of IPy2?

Thanks
Glenn
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to