durusmail: quixote-users: simple_server log to file?
*** PROBABLY SPAM *** simple_server log to file?
2005-03-08
2005-03-08
simple_server log to file?
2005-03-09
2005-03-09
2005-03-09
2005-03-09
2005-03-09
2005-03-09
2005-03-10
simple_server log to file?
Mario Ruggier
2005-03-10
On Mar 9, 2005, at 7:09 PM, mso@oz.net wrote:
> David Binger wrote:
>> I'd put a print at the bottom of
>> Publisher.__init__() and see what self.logger.error_log and
>> sys.stdout are.
>
> Or open a new stream.
>
> f = open('/tmp/x', 'w')
> print >>f, self.logger.error_log
> print >>f, sys.stdout
> f.close()

Handy tip, thanks...

It may be even slightly handier as a trivial utility:

def totmpfile(filename, content):
     f = open('/tmp/%s'%(filename), 'a')
     print>>f, content
     f.close()


m.


reply