old_contents: from plisp.interpreter import PLispInterpreter
  
  if __name__ == '__main__':
      try:
          interpreter = PLispInterpreter()
          while True:
              line = str(input("> "))
              interpreter.load_string(line)
              res = interpreter.execute()
              print(res)
      except (KeyboardInterrupt, EOFError):
          pass
  
new_contents: from plisp.interpreter import PLispInterpreter
  
  if __name__ == '__main__':
      interpreter = PLispInterpreter()
      while True:
          try:
              line = str(input("> "))
          except (KeyboardInterrupt, EOFError):
              break
          interpreter.load_string(line)
          try:
              res = interpreter.execute()
              print(res)
          except Exception as e:
              print(str(type(e)) + ": " + str(e))
  
subject: improve REPL error handling