26 Apr
2000
26 Apr
'00
10:43 p.m.
Marcus Collins wrote:
If I replace the call to sys.stderr.write with a simple print, then I get a single asterisk. Is sys.stderr.write() perhaps buffered?
I thought it was, but I just tried:
sys.stderr.write('*'); time.sleep(3); sys.stderr.write('*\n') **
and had the first asterisk printed immediately (on python shipped with RedHat 6.1). I don't think you can rely on it being unbuffered, but being a file object it does have a flush() method. Regards, Daryl Tester