Python debuggers with sys.settrace()

Sarah Mount mount.sarah at gmail.com
Sun May 2 14:06:52 EDT 2010


This is a bit of an odd question, but is there any way for a Python
debugger to suppress I/O generated by the program which is being
debugged? I guess an "obvious" thing to do would be to replace core
parts of the standard library and change any relevant imports in the
locals and globals dicts to fake ones which don't generate I/O, but
this seems brittle as the standard library will change over time. Is
it possible to modify the byte-compiled code in each stack frame? Or
is there a simpler way to do this?

Many thanks,

Sarah

-- 
Sarah Mount, Senior Lecturer, University of Wolverhampton
website:  http://www.snim2.org/
twitter: @snim2



More information about the Python-list mailing list