R. David Murray added the comment:

If you are reading in binary mode, then all readline does is get you the next 
\n terminated chunk of data, which is a convenience in some circumstances.  You 
have to do all the newline handling yourself.  Otherwise it isn't a binary read.

I think the "right way" to do what you want is to write a custom subclass of 
one of the IO classes.  Should such a subclass be added to Python?  That's an 
interesting question.  A first step toward an answer might be to post it as a 
recipe on the ActiveState site and see how many people find it useful.

----------
nosy: +r.david.murray
type: behavior -> enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17083>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to