"print" strange with Sybase module

Erwin S. Andreasen erwin at andreasen.com
Fri Jan 26 17:15:51 EST 2001


On Fri, 26 Jan 2001 10:05:44 +0100, Carsten Gaebler wrote:

>If I give Python the "-u" option the following happens:
>
>[cg at cg test]$ ./sqltest.py | tee /tmp/test.txt
>Traceback (most recent call last):
>  File "./sqltest.py", line 12, in ?
>    print row
>IOError: [Errno 32] Broken pipe
>
>
>Broken pipe?? BTW it's the same with "|less", "|more", "|gzip" etc. I'm
>confused.

Indeed -- "broken pipe" means that the other end of the connection has been
closed (i.e. the end of the pipe that is with tee) at the time the writer
sends some data down the pipe. And that's just weird.

Does it happen if you run some other shell? Or as perhaps another user?


-- 
=======================================================================
<erwin at andreasen.com>           Herlev, Denmark       Software Designer
<URL:http://www.andreasen.org/>       <*>         LASAT^WEicon Networks
=======================================================================



More information about the Python-list mailing list