[Pythonmac-SIG] Is this a bug?

Jack Jansen Jack.Jansen@cwi.nl
Tue, 18 Feb 2003 11:39:10 +0100


On Monday, Feb 17, 2003, at 19:00 Europe/Amsterdam, Stefan Petrucha  
wrote:

> MacPython 2.2.2:
>
> Documentation on module sys says that sys.stdout and/or sys.stderr can
> be any object having method write() taking one string argument. But
> test.regrtest.main() traces back executing sys.stdout.flush().
> (Background: Python is embedded into another application and sys.std*
> are redirected.)

Yes, it's a bug. The documentation indeed unequivocally states that the
object only needs a write() method. I'm not sure whether it's the  
documentation
that's in error or the flush() in regrtest, so I've filed a bug report:
<https://sourceforge.net/tracker/ 
index.php?func=detail&aid=688581&group_id=5470&atid=105470>

If you login to sourceforge you can monitor the bug to track its  
progress. In the mean time
you can just take out the flush()es in regrtest, I think.

--
Jack Jansen, <Jack.Jansen@cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma  
Goldman