[IronPython] Strange error using settrace - help needed

see_toronto at web.de see_toronto at web.de
Wed Jan 20 09:20:13 CET 2010

probably I'm just not experienced enough with IP to see what's going wrong.
If I run a script using ipy.exe and add the standard Python Lib folder to sys.path,
I can use "import os".
If I do the same, but issue an sys.settrace prior to the import the executions failes
with an index out of range error.

Here's a sample code:
def trace(frame, event, arg):
   return trace

import sys
sys.path.append('C:\Python26\Lib') # Python 2.6.4

print 'Out 1'
import os
print 'Out 2'

Actually I'm trying to embedd Python scripts into a C# project and to trace the execution.
The error showed up in that context first, but it can be reproduced with the above code and
ipy.exe as well.

Does anyone have an idea what's going wrong here?
Many thanks for your help

Preisknaller: WEB.DE DSL Flatrate für nur 16,99 Euro/mtl.! 

More information about the Ironpython-users mailing list