output redirection
Sposhua
sposhua at my.pc
Wed Dec 15 07:12:48 EST 1999
On Wed, 15 Dec 1999, Nicola Ferrari wrote:
> Hi,
> I'm working with python 1.52 and tkinter (I've installed Tcl/Tk 8.0.5) under
> windows NT4.0
> Python uses a self made C++ library which produces lots of outputs to the
> standard output.
> I would like to redirect these outputs from the python interpreter console
> to another sink (for example a file),
> but I'm not able to capture it...could someone help me?
> thank you in advance
Newby here, but I think this'll work...
import sys
sys.stdout = open("screen.dump","w")
There again, I may be completely wrong...
More information about the Python-list
mailing list