print shell output in a file

tac-tics tactics40 at gmail.com
Fri Jun 30 16:40:04 CEST 2006


It sounds like you want to use print >>

If you have an open object with a "write" property, you can do
print >> thefile, mystring
and Python will simply redirect the output to "thefile" instead of
sys.stdout.




More information about the Python-list mailing list