Overriding sys.stdout
John Q. Public
at home.com
Wed Dec 20 22:57:31 EST 2000
I would like to be able to take a snapshot of stdout while a script is
running, but still allow stdout to be written to the terminal. My
current, working, solution is to hack IDLE but I would like a generic
solution so we would not be bound to a specific IDE. I would like to
use PythonWin on NT, if I can, or do the journaling in batch mode.
My plan is to implement a class/module/whatever that I can used to
overwrite sys.stdout. This class/module/whatever would write data to a
file and send it to the old stdout. My mail questions are these:
Does such a class/module/whatever exist?
If not, does anyone have an idea where I can start for info? As a
last resort, I will start wading through IDLE and PythonWin, but I would
like some ideas first.
Thanks!
Jonathan Polley
jwpolley(a)collins(d)rockwell(d)com
More information about the Python-list
mailing list