'Handle ^C as an interrupt keystroke by resetting the current input
variables to their initial state.'

def handle_INT(self):

    self.pn = 0
    self.lineBuffer = []
    self.lineBufferIndex = 0
    self.interpreter.resetBuffer()
    self.terminal.nextLine()
    self.terminal.write('KeyboardInterrupt')
    self.terminal.nextLine()
    self.terminal.write(self.ps[self.pn])
