codecs.EncodedFile

Leo Kislov Leo.Kislov at gmail.com
Thu Oct 19 02:27:41 CEST 2006


Neil Cerutti wrote:

> It turns out to be troublesome for my case because the
> EncodedFile object translates calls to readline into calls to
> read.
>
> I believe it ought to raise a NotImplemented exception when
> readline is called.
>
> As it is it silently causes interactive applications to
> apparently hang forever, and breaks the line-buffering
> expectation of non-interactive applications.

Does it work if stdin is a pipe? If it works then raising
NotImplemented doesn't make sense.

> If raising the exception is too much to ask, then at least it
> should be documented better.

Improving documentation is always a good idea. Meanwhile see my
solution how to make readline method work:
http://groups.google.com/group/comp.lang.python/msg/f1267dc612314657




More information about the Python-list mailing list