redirecting print to a a file

AndyL ask at me
Thu May 11 08:07:00 EDT 2006


Harold Fellermann wrote:
>>>>import sys
>>>>sys.stdout = file("output","w")
>>>>print "here you go"
> 
> 


And what if I want to still send the output to stdout and just a log it 
in the file as well?

A.



More information about the Python-list mailing list