Embedding -- getting error/traceback information not to stderr?
Adrian Eyre
a.eyre at optichrome.com
Mon Jan 24 13:05:26 EST 2000
> 1) copy PyErr_Print(), modify it to append to a file (yuck!)
> 2) Modify sys.stderr to append to an internal buffer instead of a file
3) Set stderr to be stdout
#!/usr/bin/env python
import sys
sys.stderr = sys.stdout
If you need to set it back, use:
sys.stderr = sys.__stderr__
--------------------------------------------
Adrian Eyre <a.eyre at optichrome.com>
http://www.optichrome.com
More information about the Python-list
mailing list