def connectionMade(self): TerminalProtocol.connectionMade(self) self.terminal.eraseDisplay() self.terminal.resetPrivateModes([privateModes.CURSOR_MODE]) self.window = TopWindow(self._draw, self._schedule) vbox = VBox() self.logWidget = OutputWidget() vbox.addChild(self.logWidget) logHandler = logging.StreamHandler(OutputLogStream(self.logWidget)) #make it use the default formatter logHandler.setFormatter(logging.Formatter(logging.BASIC_FORMAT)) logging.getLogger().addHandler(logHandler) vbox.addChild(SeperatorWidget()) #TODO: factory stuff self.manhole = Manhole() self.manholeView = TerminalProtocolWidget(self.manhole) #set the namespace directly so it's mutable if self.manholeNamespace is not None: self.manhole.interpreter.locals = self.manholeNamespace vbox.addChild(self.manholeView) self.window.addChild(vbox)
def __init__(self, store): TerminalProtocol.__init__(self) self._store = store
def buildTerminalProtocol(self, viewer): return TerminalProtocol()
def connectionMade(self): TerminalProtocol.connectionMade(self) self._init_app_protocol()