On 15/12/13 18:01, Tobias M. wrote:
Yes, I think the logging module is the best way to do it. And it's pretty easy, see this minimal example:import logging logging.basicConfig(filename="foo.log", level=logging.DEBUG) logging.debug("This is a log message")
But The OP didn't ask how to record log messages, for which logging is great. He asked how to log *the output* of his program. I'm not so sure logging is the best way to do that. But it depends on what he really meant by output... -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
