[Python-ideas] BufferedIO and detach

Antoine Pitrou solipsis at pitrou.net
Mon Mar 4 11:45:49 CET 2013


Le Mon, 4 Mar 2013 23:15:36 +1300,
Robert Collins
<robertc at robertcollins.net> a écrit :
> On 4 March 2013 22:59, Antoine Pitrou
> <solipsis at pitrou.net> wrote:
> > Le Mon, 4 Mar 2013 19:44:27 +1300,
> > Robert Collins
> > <robertc at robertcollins.net> a
> > écrit :
> >>
> >> Yes exactly. A little more context on how I came to ask the
> >> question. I wanted to accumulate all input on an arbitrary stream
> >> within 5ms, without blocking for longer. Using raw IO + select,
> >> its possible to loop, reading one byte at a time. The io module
> >> doesn't have an API (that I could find) for putting an existing
> >> stream into non-blocking mode, so reading a larger amount and
> >> taking what is returned isn't viable.
> >
> > What do you mean exactly by that?
> 
> Just what I said. I'll happily try to rephrase. What bit was unclear?

I don't understand what you mean by "putting an existing stream into
non-blocking mode"? What stream exactly is it? And why is reading a
larger amount not viable?

Regards

Antoine.





More information about the Python-ideas mailing list