def select_ignore_interrupts(iwtd, owtd, ewtd, timeout=None):
 if (timeout is not None):
  end_time = (time.time() + timeout)
 while True:
  try:
   return select.select(iwtd, owtd, ewtd, timeout)
  except InterruptedError:
   err = sys.exc_info()[1]
   if (err.args[0] == errno.EINTR):
    if (timeout is not None):
     timeout = (end_time - time.time())
     if (timeout < 0):
      return ([], [], [])
   else:
    raise

def select_ignore_interrupts ( iwtd , owtd , ewtd , timeout = None ) : if ( timeout is not None ) : end_time = ( time . time ( ) + timeout ) while True : try : return select . select ( iwtd , owtd , ewtd , timeout ) except InterruptedError : err = sys . exc_info ( ) [ 1 ] if ( err . args [ 0 ] == errno . EINTR ) : if ( timeout is not None ) : timeout = ( end_time - time . time ( ) ) if ( timeout < 0 ) : return ( [ ] , [ ] , [ ] ) else : raise
this is a wrapper around select .