[Zope] Re: Unfair Linux Threads And Python Oh My
Daryl Tester
dt@picknowl.com.au
Thu, 27 Apr 2000 08:13:54 +0930
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