[Tutor] Makeing a logfile

Ertl, John John.Ertl at fnmoc.navy.mil
Wed Apr 28 14:37:06 EDT 2004


I am trying to make a single log file for a program that uses several
modules.  Now when I run the program I open a file and redirect standard out
to a file.  This works fine for the main program and each of the modules do
the same thing but to there own files.  I would like to have just one file
containing my log output.
 
How can I get the print statements from the modules to output to the file
opened in the main program?  I would like to be able to run the modules
individually and have the output go to the screen but when run from the main
program the prints go to the opened log file.
 
Thanks 
 
John Ertl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20040428/bde9f49b/attachment.html


More information about the Tutor mailing list