'Push a line to the interpreter.'

@pyqtSlot(str)
def push(self, line):

    self._buffer.append(line)
    source = '\n'.join(self._buffer)
    self.write((line + '\n'))
    with utils.fake_io(self.write):
        with utils.disabled_excepthook():
            self._more = self._interpreter.runsource(source, '<console>')
    self.write(self._curprompt())
    if (not self._more):
        self._buffer = []
