Duplex communication with pipes - is possible ?

alisonken1 alisonken1 at gmail.com
Fri Jun 16 18:41:36 CEST 2006

> readlines () will try to read until the stream/socket is closed. Try to
> read only one line. This of course means that you cannot sent \n as part
> of the data, you have to escape them somehow.

If I remember correctly, if you want to pass '\n' so readline won't
stop, you should be able to escape the escape '\\n', then remove the
extra '\' when actually processing.

Of course, readline will continue to read until buffer filled or a real
'\n' is passed (g).

More information about the Python-list mailing list