code: def read_line(self):
          
  
          try:
              line = self.inp.readline().strip()
          except KeyboardInterrupt:
              raise EOFError()
  
          # i3status sends EOF, or an empty line
          if not line:
              raise EOFError()
          return line
docs: Interrupted respecting reader for stdin.
  
          Raises EOFError if the end of stream has been reached