saving the text on python dos window.
Larry Bates
lbates at swamisoft.com
Thu Jun 24 09:56:41 EDT 2004
You may want to take a look at the logger class
that is built into python. You can create a log
of everything that goes to the screen for every
session that the program runs. It also provides
a powerful way to log any errors/exceptions that
may occur during program execution.
HTH,
Larry Bates
Syscon, Inc.
"sarmin kho" <sarmin_kho at yahoo.com> wrote in message
news:mailman.77.1088067779.27577.python-list at python.org...
Hi Pythoners..
"print (text)' command will print the 'text' on dos window when executing a
python script. i would like to save all the text printed on the dos window
to a file at the end of the python script execution..
sys.stdout.GetLine() gave me an empty string..
where is the handle to the printed text, please?
i m also using scripts written by someone else so some printed texts are not
mine but i would like to keep all the printed text for debugging.. the
printed texts contain not only error messages but also all other texts i
wish to keep.
many thanks chaps..
sarmin
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
More information about the Python-list
mailing list