def __init__(self, *p, **kw): from bl.utils import buildNamespace namespace = buildNamespace( 'twisted.internet', 'itertools', 'functools', 'collections', 'bl.instrument.fsynth', 'bl.notes', 'bl.scheduler', 'bl.debug', 'bl.arp', 'bl.ugen', 'comps.complib', 'txosc.async', 'bl.osc') namespace.update({'random': random}) self.namespace = namespace ConsoleManhole.__init__(self, *p, **kw)
def __init__(self, *p, **kw): from bl.utils import buildNamespace namespace = buildNamespace('twisted.internet', 'itertools', 'functools', 'collections', 'bl.instrument.fsynth', 'bl.notes', 'bl.scheduler', 'bl.debug', 'bl.arp', 'bl.ugen', 'comps.complib', 'txosc.async', 'bl.osc') namespace.update({'random': random}) self.namespace = namespace ConsoleManhole.__init__(self, *p, **kw)
def handle_RETURN(self): line = ''.join(self.lineBuffer) if self._onPrompt: return self._answerPrompt(line) rv = ConsoleManhole.handle_RETURN(self) if line and self.persistent: self._historyFd.write(line + '\n') if self.session: log.msg('session set - forwarding line: %r' % line) self.session.write(line + '\r\n') return rv
def __init__(self, *p, **kw): from bl.utils import buildNamespace namespace = buildNamespace( "twisted.internet", "itertools", "functools", "collections", "bl.instrument.fsynth", "bl.notes", "bl.scheduler", "bl.debug", "bl.arp", "bl.ugen", "comps.complib", "txosc.async", "bl.osc", ) namespace.update({"random": random}) self.namespace = namespace ConsoleManhole.__init__(self, *p, **kw)
def connectionMade(self): ConsoleManhole.connectionMade(self) if self.persistent: self._readHistoryFile() self.interpreter.locals['console'] = self
def connectionLost(self, reason): if self.persistent: self._historyFd.close() path = FilePath(self.historyFile + ('.%d' % self._historySession)) path.moveTo(FilePath(self.historyFile)) ConsoleManhole.connectionLost(self, reason)
def connectionMade(self): ConsoleManhole.connectionMade(self) self.keyHandlers[CTRL_K] = self._killRestOfLine