Re: Non-exhaustive file reads

2006-12-02 Thread Fredrik Tolf
On Sat, 2006-12-02 at 20:00 -0800, Paul Rubin wrote: > Fredrik Tolf <[EMAIL PROTECTED]> writes: > > mode, but nowhere can I find any information about how to enable > > non-blocking mode in Python. > > > > Can anyone provide me with any information on how to accomplish this? > > In Linux you'd us

Re: Non-exhaustive file reads

2006-12-02 Thread Paul Rubin
Fredrik Tolf <[EMAIL PROTECTED]> writes: > mode, but nowhere can I find any information about how to enable > non-blocking mode in Python. > > Can anyone provide me with any information on how to accomplish this? In Linux you'd use fcntl. Some other discussion can be found on the web: http:

Non-exhaustive file reads

2006-12-02 Thread Fredrik Tolf
I just got shocked to find out the hard way that the read() method on Python's file objects will, very much unlike the C read() function, read until the given size is reached, which is quite a problem for me when selecting a couple of pipes and wanting to just read the available data from them. Th