class documentation

An ITerminalTransport implementation which forwards calls to one or more other ITerminalTransports.

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.

Method __init__ Undocumented
Method applicationKeypadMode Cause keypad to generate control functions.
Method cursorBackward Move the cursor left n columns.
Method cursorDown Move the cursor down n lines.
Method cursorForward Move the cursor right n columns.
Method cursorHome Move the cursor home.
Method cursorPosition Move the cursor to the given line and column.
Method cursorUp Move the cursor up n lines.
Method deleteCharacter Delete n characters starting at the cursor position.
Method deleteLine Delete n lines starting at the cursor position.
Method doubleHeightLine Make the current line the top or bottom half of a double-height, double-width line.
Method doubleWidthLine Make the current line a double-width line.
Method eraseDisplay Erase the entire display.
Method eraseLine Erase the entire cursor line.
Method eraseToDisplayBeginning Erase from the cursor to the beginning of the display, including the cursor position.
Method eraseToDisplayEnd Erase from the cursor to the end of the display, including the cursor position.
Method eraseToLineBeginning Erase from the cursor to the beginning of the line, including the cursor position.
Method eraseToLineEnd Erase from the cursor to the end of line, including cursor position.
Method getHost Similar to getPeer, but returns an address describing this side of the connection.
Method getPeer Get the remote address of this connection.
Method horizontalTabulationSet Set a tab stop at the current cursor position.
Method index Move the cursor down one line, performing scrolling if necessary.
Method insertLine Insert n lines at the cursor position.
Method loseConnection Close my connection, after writing all pending data.
Method nextLine Move the cursor to the first position on the next line, performing scrolling if necessary.
Method numericKeypadMode Cause keypad to generate normal characters.
Method reportCursorPosition Return a Deferred that fires with a two-tuple of (x, y) indicating the cursor position.
Method reset Reset the terminal to its initial state.
Method resetModes Reset the given modes on the terminal.
Method resetPrivateModes Reset the given DEC private modes on the terminal.
Method restoreCursor Restore the previously saved cursor position, character attribute, character set, and origin mode selection.
Method reverseIndex Move the cursor up one line, performing scrolling if necessary.
Method saveCursor Save the cursor position, character attribute, character set, and origin mode selection.
Method selectCharacterSet Select a character set.
Method selectGraphicRendition Enabled one or more character attributes.
Method setModes Set the given modes on the terminal.
Method setPrivateModes Set the given DEC private modes on the terminal.
Method shiftIn Activate the G0 character set.
Method shiftOut Activate the G1 character set.
Method singleShift2 Shift to the G2 character set for a single character.
Method singleShift3 Shift to the G3 character set for a single character.
Method singleWidthLine Make the current line a single-width, single-height line.
Method tabulationClear Clear the tab stop at the current cursor position.
Method tabulationClearAll Clear all tab stops.
Method unhandledControlSequence Called when an unsupported control sequence is received.
Method write Write some data to the physical connection, in sequence, in a non-blocking fashion.
Method writeSequence Write an iterable of byte strings to the physical connection.
Constant BACKSPACE Undocumented
Constant TAB Undocumented
Class Variable execBytes Undocumented
Class Variable execStr Undocumented
Instance Variable transports Undocumented
def __init__(self, *transports): (source)

Undocumented

def applicationKeypadMode(self): (source)

Cause keypad to generate control functions.

Cursor key mode selects the type of characters generated by cursor keys.

def cursorBackward(self, n=1): (source)

Move the cursor left n columns.

def cursorDown(self, n=1): (source)

Move the cursor down n lines.

def cursorForward(self, n=1): (source)

Move the cursor right n columns.

def cursorHome(self): (source)
def cursorPosition(self, column, line): (source)

Move the cursor to the given line and column.

def cursorUp(self, n=1): (source)

Move the cursor up n lines.

def deleteCharacter(self, n=1): (source)

Delete n characters starting at the cursor position.

Characters to the right of deleted characters are shifted to the left.

def deleteLine(self, n=1): (source)

Delete n lines starting at the cursor position.

Lines below the cursor are shifted up. This command is ignored when the cursor is outside the scroll region.

def doubleHeightLine(self, top=True): (source)

Make the current line the top or bottom half of a double-height, double-width line.

If top is True, the current line is the top half. Otherwise, it is the bottom half.

def doubleWidthLine(self): (source)

Make the current line a double-width line.

def eraseDisplay(self): (source)

Erase the entire display.

def eraseLine(self): (source)

Erase the entire cursor line.

def eraseToDisplayBeginning(self): (source)

Erase from the cursor to the beginning of the display, including the cursor position.

def eraseToDisplayEnd(self): (source)

Erase from the cursor to the end of the display, including the cursor position.

def eraseToLineBeginning(self): (source)

Erase from the cursor to the beginning of the line, including the cursor position.

def eraseToLineEnd(self): (source)

Erase from the cursor to the end of line, including cursor position.

def getHost(self): (source)

Similar to getPeer, but returns an address describing this side of the connection.

Returns
An IAddress provider.
def getPeer(self): (source)

Get the remote address of this connection.

Treat this method with caution. It is the unfortunate result of the CGI and Jabber standards, but should not be considered reliable for the usual host of reasons; port forwarding, proxying, firewalls, IP masquerading, etc.

Returns
An IAddress provider.
def horizontalTabulationSet(self): (source)

Set a tab stop at the current cursor position.

def index(self): (source)

Move the cursor down one line, performing scrolling if necessary.

def insertLine(self, n=1): (source)

Insert n lines at the cursor position.

Lines below the cursor are shifted down. Lines moved past the bottom margin are lost. This command is ignored when the cursor is outside the scroll region.

def loseConnection(self): (source)

Close my connection, after writing all pending data.

Note that if there is a registered producer on a transport it will not be closed until the producer has been unregistered.

def nextLine(self): (source)

Move the cursor to the first position on the next line, performing scrolling if necessary.

def numericKeypadMode(self): (source)

Cause keypad to generate normal characters.

def reportCursorPosition(self): (source)

Return a Deferred that fires with a two-tuple of (x, y) indicating the cursor position.

def reset(self): (source)

Reset the terminal to its initial state.

def resetModes(self, mode): (source)

Reset the given modes on the terminal.

def resetPrivateModes(self, modes): (source)

Reset the given DEC private modes on the terminal.

def restoreCursor(self): (source)

Restore the previously saved cursor position, character attribute, character set, and origin mode selection.

If no cursor state was previously saved, move the cursor to the home position.

def reverseIndex(self): (source)

Move the cursor up one line, performing scrolling if necessary.

def saveCursor(self): (source)

Save the cursor position, character attribute, character set, and origin mode selection.

def selectCharacterSet(self, charSet, which): (source)

Select a character set.

charSet should be one of CS_US, CS_UK, CS_DRAWING, CS_ALTERNATE, or CS_ALTERNATE_SPECIAL.

which should be one of G0 or G1.

def selectGraphicRendition(self, *attributes): (source)

Enabled one or more character attributes.

Arguments should be one or more of UNDERLINE, REVERSE_VIDEO, BLINK, or BOLD. NORMAL may also be specified to disable all character attributes.

def setModes(self, modes): (source)

Set the given modes on the terminal.

def setPrivateModes(self, modes): (source)

Set the given DEC private modes on the terminal.

def shiftIn(self): (source)

Activate the G0 character set.

def shiftOut(self): (source)

Activate the G1 character set.

def singleShift2(self): (source)

Shift to the G2 character set for a single character.

def singleShift3(self): (source)

Shift to the G3 character set for a single character.

def singleWidthLine(self): (source)

Make the current line a single-width, single-height line.

def tabulationClear(self): (source)

Clear the tab stop at the current cursor position.

def tabulationClearAll(self): (source)
def unhandledControlSequence(self, seq): (source)

Called when an unsupported control sequence is received.

Parameters
seq:strThe whole control sequence which could not be interpreted.
def write(self, data): (source)

Write some data to the physical connection, in sequence, in a non-blocking fashion.

If possible, make sure that it is all written. No data will ever be lost, although (obviously) the connection may be closed before it all gets through.

Parameters
dataThe data to write.
def writeSequence(self, data): (source)

Write an iterable of byte strings to the physical connection.

If possible, make sure that all of the data is written to the socket at once, without first copying it all into a single byte string.

Parameters
dataThe data to write.
BACKSPACE: bytes = (source)

Undocumented

Value
b'\x7f'

Undocumented

Value
b'\t'
execBytes = (source)

Undocumented

Undocumented

transports = (source)

Undocumented