'e' sounds reasonable as does the layout of the call.
The question is how do you specify you wish to select/poll on it
for both reading and writing? Remember, sockets are bi-directional.
Or would you prefer that you do a sock.makefile('r') on it first?
Actually that seems like a nice solution to that. Forget the statement
above. I answered my own question.
> The timeout would be in some
> convenient timeformat with enough granularity to satisfy most needs
> (tenth of seconds?). If the timeout is 'None' the call would be
I like that. But you should make it milliseconds since that is what
the select() and poll() actually take. (Although for the project I am
working on, I will probably only set it for 5-10 MINUTES :) )
> It will return a list of (fileobject, string) pairs for
> those fileobjects that have one or multiple events pending, or 'None'
> if there are no pending events on any of the fileobjects.
Sounds reasonable. Clean, clear, easy to parse return!
> If you have poll(), the implementation is quite straight-forward. If
> you only have select(), you have to construct the bitmasks from the
> filelist information (which shouldn't be too hard).
The problem with poll() is that on some platforms, it handles
sockets, pipes, and files differently than select(). But I think
that the C code should be able to select which one you wish
to use via a #define statement when you do the compile.