
On 5 March 2013 10:15, Antoine Pitrou <solipsis@pitrou.net> wrote:
On Tue, 5 Mar 2013 10:17:11 +1300 Robert Collins <robertc@robertcollins.net> wrote:
sys.stdin - starts in blocking mode. How do you convert it to non-blocking mode? Portably? Now, how do you convert it to non-blocking mode when you don't know that it is fd 1, and instead you just have a stream (TextIOWrapper or BufferedReader or even a RawIO instance) ?
How about the fileno() method?
What about it? Do you mean 'non-blocking mode is entirely defined by the OS level read() behaviour and there is no tracking of that state higher up' ? If so cool (and we should document that somewhere). I'll need to go lookup the windows equivalent to FCNTL, and I still think the current hidden buffer status is problematic. -Rob -- Robert Collins <rbtcollins@hp.com> Distinguished Technologist HP Cloud Services