Module Expr Str Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias Assign NameStore Dict ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign SubscriptStore NameLoad Index NameLoad BinOpAdd NameLoad Num Assign AttributeStore NameLoad attr Call NameLoad BinOpAdd BinOpAdd NameLoad Str Call NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Call AttributeLoad Call NameLoad NameLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Call AttributeLoad Call NameLoad NameLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Return Call NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Expr Call NameLoad AttributeLoad NameLoad attr For NameStore TupleLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str body Exec BinOpMod Str TupleLoad NameLoad Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults vararg body Assert NameLoad Str Assign AttributeStore NameLoad attr NameLoad decorator_list For NameStore AttributeLoad NameLoad attr body Exec BinOpMod Str TupleLoad NameLoad NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore TupleLoad Str Str Assign NameStore Num FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr Num Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Str attr AttributeLoad NameLoad attr Return TupleLoad SubscriptLoad NameLoad Slice AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call NameLoad orelse If CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad orelse Assign SubscriptStore AttributeLoad NameLoad attr Slice AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Num ListLoad NameLoad AugAssignAdd AttributeStore NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpSub AttributeLoad NameLoad attr BinOpMod Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AugAssignAdd AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMult Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareGt AttributeLoad NameLoad attr Num body AugAssignSub AttributeStore NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If CompareLt AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr body AugAssignAdd AttributeStore NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpSub Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If CompareGt AttributeLoad NameLoad attr Num body AugAssignSub AttributeStore NameLoad attr Num Delete SubscriptDel AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If CompareLt AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr body Delete SubscriptDel AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assert CompareIn AttributeLoad NameLoad attr TupleLoad Str Str If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr Num Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Return TupleLoad SubscriptLoad NameLoad Slice AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If NameLoad body For NameStore SubscriptLoad NameLoad Slice Num body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body If BoolOpAnd AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If CompareGt AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AugAssignSub AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If CompareLt AttributeLoad NameLoad attr BinOpSub Call NameLoad AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
Basic line editing support.

@author: Jp Calderone
 N/A string zope.interface implements twisted.conch.insults insults helper twisted.python log reflect N/A _counters N/A Logging N/A object N/A N/A Wrapper which logs attribute lookups.

    This was useful in debugging something, I guess.  I forget what.
    It can probably be deleted or moved somewhere more appropriate.
    Nothing special going on here, really.
     __init__ N/A N/A self original N/A N/A N/A N/A self original original N/A key N/A N/A reflect qual N/A original __class__ N/A count N/A N/A _counters get key 0 N/A N/A _counters N/A key N/A count 1 N/A N/A self _logFile N/A file N/A N/A key - N/A str count w N/A __str__ N/A N/A self N/A N/A N/A N/A str N/A N/A N/A super Logging self __getattribute__ original N/A __repr__ N/A N/A self N/A N/A N/A N/A repr N/A N/A N/A super Logging self __getattribute__ original N/A __getattribute__ N/A N/A self name N/A N/A N/A original N/A N/A N/A super Logging self __getattribute__ original N/A logFile N/A N/A N/A super Logging self __getattribute__ _logFile N/A N/A N/A logFile write N/A name N/A N/A getattr original name N/A N/A TransportSequence N/A object N/A N/A An L{ITerminalTransport} implementation which forwards calls to
    one or more other L{ITerminalTransport}s.

    This is a cheap way for servers to keep track of the state they
    expect the client to see, since all terminal manipulations can be
    send to the real client and to a terminal emulator that lives in
    the server process.
     N/A N/A implements N/A insults ITerminalTransport N/A keyID N/A UP_ARROW DOWN_ARROW RIGHT_ARROW LEFT_ARROW HOME INSERT DELETE END PGUP PGDN F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 N/A N/A N/A %s = object() N/A keyID N/A TAB N/A BACKSPACE __init__ N/A N/A self N/A transports N/A N/A transports Cannot construct a TransportSequence with no transports N/A N/A self transports transports N/A N/A method N/A insults ITerminalTransport N/A N/A N/A def %s(self, *a, **kw):
    for tpt in self.transports:
        result = tpt.%s(*a, **kw)
    return result
 N/A method method N/A LocalTerminalBufferMixin N/A object N/A N/A A mixin for RecvLine subclasses which records the state of the terminal.

    This is accomplished by performing all L{ITerminalTransport} operations on both
    the transport passed to makeConnection and an instance of helper.TerminalBuffer.

    @ivar terminalCopy: A L{helper.TerminalBuffer} instance which efforts
    will be made to keep up to date with the actual terminal
    associated with this protocol instance.
     makeConnection N/A N/A self transport N/A N/A N/A N/A self terminalCopy N/A N/A helper TerminalBuffer N/A N/A N/A N/A self terminalCopy connectionMade N/A N/A N/A N/A super LocalTerminalBufferMixin self makeConnection N/A TransportSequence transport N/A self terminalCopy N/A __str__ N/A N/A self N/A N/A N/A N/A str N/A self terminalCopy N/A N/A RecvLine N/A N/A insults TerminalProtocol N/A N/A L{TerminalProtocol} which adds line editing features.

    Clients will be prompted for lines of input with all the usual
    features: character echoing, left and right arrow support for
    moving the cursor to different areas of the line buffer, backspace
    and delete for removing characters, and insert for toggling
    between typeover and insert mode.  Tabs will be expanded to enough
    spaces to move the cursor to the next tabstop (every four
    characters by default).  Enter causes the line buffer to be
    cleared and the line to be passed to the lineReceived() method
    which, by default, does nothing.  Subclasses are responsible for
    redrawing the input prompt (this will probably change).
     N/A width 80 N/A height 24 N/A TABSTOP 4 N/A ps N/A >>>  ...  N/A pn 0 connectionMade N/A N/A self N/A N/A N/A N/A self lineBuffer N/A N/A N/A self lineBufferIndex 0 N/A t N/A self terminal N/A N/A self keyHandlers N/A N/A t LEFT_ARROW N/A t RIGHT_ARROW N/A t TAB N/A t BACKSPACE N/A t DELETE N/A t INSERT N/A t HOME N/A t END N/A self handle_LEFT N/A self handle_RIGHT N/A self handle_TAB N/A self handle_RETURN N/A self handle_RETURN N/A self handle_BACKSPACE N/A self handle_DELETE N/A self handle_INSERT N/A self handle_HOME N/A self handle_END N/A N/A N/A self initializeScreen N/A initializeScreen N/A N/A self N/A N/A N/A N/A N/A N/A self terminal reset N/A N/A N/A N/A self terminal write N/A N/A self ps N/A N/A self pn N/A N/A N/A self setInsertMode N/A currentLineBuffer N/A N/A self N/A N/A N/A s N/A N/A join N/A self lineBuffer N/A N/A N/A s N/A N/A self lineBufferIndex N/A s N/A N/A self lineBufferIndex N/A setInsertMode N/A N/A self N/A N/A N/A N/A self mode insert N/A N/A N/A N/A self terminal setModes N/A N/A N/A insults modes IRM N/A setTypeoverMode N/A N/A self N/A N/A N/A N/A self mode typeover N/A N/A N/A N/A self terminal resetModes N/A N/A N/A insults modes IRM N/A drawInputLine N/A N/A self N/A N/A N/A 
        Write a line containing the current input prompt and the current line
        buffer at the current cursor position.
         N/A N/A N/A N/A self terminal write N/A N/A N/A self ps N/A N/A self pn N/A N/A join N/A self lineBuffer N/A terminalSize N/A N/A self width height N/A N/A N/A N/A N/A N/A self terminal eraseDisplay N/A N/A N/A N/A self terminal cursorHome N/A N/A self width width N/A N/A self height height N/A N/A N/A self drawInputLine N/A unhandledControlSequence N/A N/A self seq N/A N/A N/A N/A keystrokeReceived N/A N/A self keyID modifier N/A N/A N/A m N/A N/A N/A self keyHandlers get keyID N/A N/A m None N/A N/A N/A m N/A N/A N/A keyID N/A string printable N/A N/A N/A N/A self characterReceived keyID False N/A N/A N/A N/A log msg N/A Received unhandled keyID: %r N/A keyID N/A characterReceived N/A N/A self ch moreCharactersComing N/A N/A N/A N/A N/A self mode insert N/A N/A N/A N/A N/A self lineBuffer insert N/A self lineBufferIndex ch N/A N/A N/A N/A self lineBuffer N/A N/A self lineBufferIndex N/A N/A self lineBufferIndex 1 N/A ch N/A N/A self lineBufferIndex 1 N/A N/A N/A N/A self terminal write ch N/A handle_TAB N/A N/A self N/A N/A N/A n N/A N/A self TABSTOP N/A N/A len N/A self lineBuffer N/A self TABSTOP N/A N/A N/A N/A self terminal cursorForward n N/A N/A self lineBufferIndex n N/A N/A N/A N/A self lineBuffer extend N/A n N/A handle_LEFT N/A N/A self N/A N/A N/A N/A N/A self lineBufferIndex 0 N/A N/A N/A self lineBufferIndex 1 N/A N/A N/A N/A self terminal cursorBackward N/A handle_RIGHT N/A N/A self N/A N/A N/A N/A N/A self lineBufferIndex N/A len N/A self lineBuffer N/A N/A N/A self lineBufferIndex 1 N/A N/A N/A N/A self terminal cursorForward N/A handle_HOME N/A N/A self N/A N/A N/A N/A self lineBufferIndex N/A N/A N/A N/A N/A self terminal cursorBackward N/A self lineBufferIndex N/A N/A self lineBufferIndex 0 N/A handle_END N/A N/A self N/A N/A N/A offset N/A N/A len N/A self lineBuffer N/A self lineBufferIndex N/A offset N/A N/A N/A N/A N/A self terminal cursorForward offset N/A N/A self lineBufferIndex N/A len N/A self lineBuffer N/A handle_BACKSPACE N/A N/A self N/A N/A N/A N/A N/A self lineBufferIndex 0 N/A N/A N/A self lineBufferIndex 1 N/A N/A N/A self lineBuffer N/A N/A self lineBufferIndex N/A N/A N/A N/A self terminal cursorBackward N/A N/A N/A N/A self terminal deleteCharacter N/A handle_DELETE N/A N/A self N/A N/A N/A N/A N/A self lineBufferIndex N/A len N/A self lineBuffer N/A N/A N/A N/A self lineBuffer N/A N/A self lineBufferIndex N/A N/A N/A N/A self terminal deleteCharacter N/A handle_RETURN N/A N/A self N/A N/A N/A line N/A N/A join N/A self lineBuffer N/A N/A self lineBuffer N/A N/A N/A self lineBufferIndex 0 N/A N/A N/A N/A self terminal nextLine N/A N/A N/A self lineReceived line N/A handle_INSERT N/A N/A self N/A N/A N/A N/A N/A self mode N/A typeover insert N/A N/A N/A self mode typeover N/A N/A N/A N/A self setInsertMode N/A N/A N/A N/A self setTypeoverMode N/A lineReceived N/A N/A self line N/A N/A N/A N/A N/A HistoricRecvLine N/A RecvLine N/A N/A L{TerminalProtocol} which adds both basic line-editing features and input history.

    Everything supported by L{RecvLine} is also supported by this class.  In addition, the
    up and down arrows traverse the input history.  Each received line is automatically
    added to the end of the input history.
     connectionMade N/A N/A self N/A N/A N/A N/A N/A RecvLine connectionMade self N/A N/A self historyLines N/A N/A N/A self historyPosition 0 N/A t N/A self terminal N/A N/A N/A N/A self keyHandlers update N/A N/A t UP_ARROW N/A t DOWN_ARROW N/A self handle_UP N/A self handle_DOWN N/A currentHistoryBuffer N/A N/A self N/A N/A N/A b N/A tuple N/A self historyLines N/A N/A N/A b N/A N/A self historyPosition N/A b N/A N/A self historyPosition N/A _deliverBuffer N/A N/A self buf N/A N/A N/A buf N/A N/A ch N/A buf N/A -1 N/A N/A N/A N/A self characterReceived ch True N/A N/A N/A self characterReceived N/A buf N/A -1 False N/A handle_UP N/A N/A self N/A N/A N/A N/A N/A self lineBuffer N/A N/A self historyPosition N/A len N/A self historyLines N/A N/A N/A N/A N/A self historyLines append N/A self lineBuffer N/A N/A N/A self historyPosition 0 N/A N/A N/A N/A self handle_HOME N/A N/A N/A N/A self terminal eraseToLineEnd N/A N/A self historyPosition 1 N/A N/A self lineBuffer N/A N/A N/A N/A self _deliverBuffer N/A N/A self historyLines N/A N/A self historyPosition N/A handle_DOWN N/A N/A self N/A N/A N/A N/A N/A self historyPosition N/A N/A len N/A self historyLines 1 N/A N/A N/A N/A self handle_HOME N/A N/A N/A N/A self terminal eraseToLineEnd N/A N/A self historyPosition 1 N/A N/A self lineBuffer N/A N/A N/A N/A self _deliverBuffer N/A N/A self historyLines N/A N/A self historyPosition N/A N/A N/A N/A self handle_HOME N/A N/A N/A N/A self terminal eraseToLineEnd N/A N/A self historyPosition N/A len N/A self historyLines N/A N/A self lineBuffer N/A N/A N/A self lineBufferIndex 0 N/A handle_RETURN N/A N/A self N/A N/A N/A N/A self lineBuffer N/A N/A N/A N/A N/A self historyLines append N/A N/A join N/A self lineBuffer N/A N/A self historyPosition N/A len N/A self historyLines N/A N/A N/A RecvLine handle_RETURN self N/A N/A