def _select_for(fd, readable, writable, error, timeout):
 (rset, wset, xset) = ([], [], [])
 if readable:
  rset = [fd]
 if writable:
  wset = [fd]
 if error:
  xset = [fd]
 if (timeout is None):
  (rcount, wcount, xcount) = select.select(rset, wset, xset)
 else:
  (rcount, wcount, xcount) = select.select(rset, wset, xset, timeout)
 return bool((rcount or wcount or xcount))

def _select_for ( fd , readable , writable , error , timeout ) : ( rset , wset , xset ) = ( [ ] , [ ] , [ ] ) if readable : rset = [ fd ] if writable : wset = [ fd ] if error : xset = [ fd ] if ( timeout is None ) : ( rcount , wcount , xcount ) = select . select ( rset , wset , xset ) else : ( rcount , wcount , xcount ) = select . select ( rset , wset , xset , timeout ) return bool ( ( rcount or wcount or xcount ) )
select polling backend .