def win32select(r, w, e, timeout=None):
 if (not (r or w)):
  if (timeout is None):
   timeout = 0.01
  else:
   timeout = min(timeout, 0.001)
  sleep(timeout)
  return ([], [], [])
 if ((timeout is None) or (timeout > 0.5)):
  timeout = 0.5
 (r, w, e) = select.select(r, w, w, timeout)
 return (r, (w + e), [])

def win32select ( r , w , e , timeout = None ) : if ( not ( r or w ) ) : if ( timeout is None ) : timeout = 0.01 else : timeout = min ( timeout , 0.001 ) sleep ( timeout ) return ( [ ] , [ ] , [ ] ) if ( ( timeout is None ) or ( timeout > 0.5 ) ) : timeout = 0.5 ( r , w , e ) = select . select ( r , w , w , timeout ) return ( r , ( w + e ) , [ ] )
win32 select wrapper .