def read_no_interrupt(p):
 import errno
 try:
  return p.read()
 except IOError as err:
  if (err.errno != errno.EINTR):
   raise

def read_no_interrupt ( p ) : import errno try : return p . read ( ) except IOError as err : if ( err . errno != errno . EINTR ) : raise
read from a pipe ignoring eintr errors .