'Exit interpreter'

def exit_interpreter(self):

    self.interpreter.exit_flag = True
    if self.multithreaded:
        self.interpreter.stdin_write.write(to_binary_string('\n'))
    self.interpreter.restore_stds()
