How do I redirect output to a file and to the console screen?

28tommy 28tommy at gmail.com
Wed Dec 28 12:37:28 EST 2005


Hi there,

I'm doing some TELNET and FTP sessions with my scripts. I need to
redirect all the output (and not just what I print) to an output file,
but still be able to see the session in process on the console.

The Console screen is of less importance, so I could give it up, but
what I'm looking for is a way to see all the interaction with the
remote seesions on a file, that all the console data was redirected to
it from within the script file.

P.S. - the command "python script_file > output_file" is not from
within the file, so it won't work for me. 

Thank you (-:




More information about the Python-list mailing list