'Deal with keyboard interrupt (typically Control-C).  It
will :meth:`~Connection.interrupt` the database and print"^C" if interactive.'

def handle_interrupt(self):

    self.db.interrupt()
    if ((not self.bail) and self.interactive):
        self.write(self.stderr, '^C\n')
        return
    raise
