Re: Is there a portable way to tell if data is available on a pipe?

2008-01-21 Thread Scott David Daniels
John Nagle wrote: I need some way to find out if a pipe has data available for a read without blocking if it does not. ... I'd like to avoid having a thread to manage each pipe, but if I have to, so be it. Well, without granting your wish, put a Queue.Queue in front of each pipe. The

Re: Is there a portable way to tell if data is available on a pipe?

2008-01-21 Thread John Nagle
Scott David Daniels wrote: John Nagle wrote: I need some way to find out if a pipe has data available for a read without blocking if it does not. ... I'd like to avoid having a thread to manage each pipe, but if I have to, so be it. Well, without granting your wish, put a Queue.Queue

Is there a portable way to tell if data is available on a pipe?

2008-01-20 Thread John Nagle
I need some way to find out if a pipe has data available for a read without blocking if it does not. select, unfortunately, doesn't work on pipes on Windows. I think there's something proposed for Python 3000, but that's not useful now. I'd like to avoid having a thread to