Duplex communication with pipes - is possible ?

alisonken1 alisonken1 at gmail.com
Fri Jun 16 12:41:36 EDT 2006


<snip
>
> 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.
>
<snip>

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