def codeInput(self, text): from twisted.manhole.service import runInConsole val = runInConsole(text, self.output.console, self.globalNS, self.localNS, self.filename) if val is not None: self.localNS["_"] = val self.output.console([("result", repr(val) + "\n")])
def codeSent(self, value): self.inbox.setAttr(u'value', u'') #clear the input result = service.runInConsole(value, None, globalNS=self.ns) if result is not None: d = self.outbox.getAttr(u'value') d.addCallback(self.updateOutput, repr(result))