Re: select.poll.poll() never blocks

2009-02-11 Thread birdsong
On Feb 11, 10:36 pm, "Hendrik van Rooyen" wrote: > "birdsong" wrote: > > 8<--- select not blocking on empty file stuff - > > > Any help on what I'm missing would be appreciated. > > Why do you expect it to block? > It is ready to read, to return end of file. > I expected it

Re: select.poll.poll() never blocks

2009-02-11 Thread Hendrik van Rooyen
"birdsong" wrote: 8<--- select not blocking on empty file stuff - > Any help on what I'm missing would be appreciated. Why do you expect it to block? It is ready to read, to return end of file. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: select.poll.poll() never blocks

2009-02-11 Thread birdsong
On Feb 11, 7:47 pm, "Rhodri James" wrote: > On Thu, 12 Feb 2009 03:01:16 -, birdsong   > wrote: > > > So I guess I didn't have a complete understanding of poll, I thought > > it returned file descriptors that had registered an event that the > > user asked to watch for.  In my case, select.PO

Re: select.poll.poll() never blocks

2009-02-11 Thread Miles
On Wed, Feb 11, 2009 at 10:47 PM, Rhodri James wrote: > If you want to > do it in Python, the only thing that springs to mind is > periodically checking the size of the file and reading more > when that changes. You'll need to be very careful to keep > what size you think the file is in sync with

Re: select.poll.poll() never blocks

2009-02-11 Thread Rhodri James
On Thu, 12 Feb 2009 03:01:16 -, birdsong wrote: So I guess I didn't have a complete understanding of poll, I thought it returned file descriptors that had registered an event that the user asked to watch for. In my case, select.POLLIN ConstantMeaning POLLIN There is data to read

Re: select.poll.poll() never blocks

2009-02-11 Thread birdsong
So I guess I didn't have a complete understanding of poll, I thought it returned file descriptors that had registered an event that the user asked to watch for. In my case, select.POLLIN ConstantMeaning POLLIN There is data to read ...there ins't any data to be read. The file is readabl

Re: select.poll.poll() never blocks

2009-02-11 Thread Jean-Paul Calderone
On Wed, 11 Feb 2009 18:44:53 -0800 (PST), birdsong wrote: I'm pretty sure I've exhausted all searches and read all the forums Google will turn up related to this issue. I touch an empty file in a sh shell, fire up the python shell, open the file for reading(tried all buffering options), regist

select.poll.poll() never blocks

2009-02-11 Thread birdsong
I'm pretty sure I've exhausted all searches and read all the forums Google will turn up related to this issue. I touch an empty file in a sh shell, fire up the python shell, open the file for reading(tried all buffering options), register it with a poll object for select.POLLIN and call poll(), bu