t.c.i.h.TerminalBuffer(protocol.Protocol) : class documentation

Part of twisted.conch.insults.helper View Source View In Hierarchy

Known subclasses: twisted.conch.insults.helper.ExpectableBuffer

An in-memory terminal emulator.
Method getCharacter Undocumented
Method connectionMade Called when a connection is made.
Method write Add the given printable bytes to the terminal.
Method insertAtCursor Add one byte to the terminal at the cursor and make consequent state updates.
Method cursorUp Undocumented
Method cursorDown Undocumented
Method cursorBackward Undocumented
Method cursorForward Undocumented
Method cursorPosition Undocumented
Method cursorHome Undocumented
Method index Undocumented
Method reverseIndex Undocumented
Method nextLine Update the cursor position attributes and scroll down if appropriate.
Method saveCursor Undocumented
Method restoreCursor Undocumented
Method setModes Undocumented
Method resetModes Undocumented
Method setPrivateModes Enable the given modes.
Method resetPrivateModes Disable the given modes.
Method applicationKeypadMode Undocumented
Method numericKeypadMode Undocumented
Method selectCharacterSet Undocumented
Method shiftIn Undocumented
Method shiftOut Undocumented
Method singleShift2 Undocumented
Method singleShift3 Undocumented
Method selectGraphicRendition Undocumented
Method eraseLine Undocumented
Method eraseToLineEnd Undocumented
Method eraseToLineBeginning Undocumented
Method eraseDisplay Undocumented
Method eraseToDisplayEnd Undocumented
Method eraseToDisplayBeginning Undocumented
Method deleteCharacter Undocumented
Method insertLine Undocumented
Method deleteLine Undocumented
Method reportCursorPosition Undocumented
Method reset Undocumented
Method unhandledControlSequence Undocumented
Method __str__ Undocumented
Method _currentFormattingState Undocumented
Method _emptyLine Undocumented
Method _scrollDown Undocumented
Method _scrollUp Undocumented

Inherited from Protocol:

Method logPrefix Return a prefix matching the class name, to identify log messages related to this protocol instance.
Method dataReceived Called whenever data is received.
Method connectionLost Called when the connection is shut down.

Inherited from BaseProtocol (via Protocol):

Method makeConnection Make a connection to a transport and a server.
def getCharacter(self, x, y): (source)
Undocumented
def connectionMade(self): (source)
Called when a connection is made.

This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.

def write(self, bytes): (source)
Add the given printable bytes to the terminal.

Line feeds in bytes will be replaced with carriage return / line feed pairs.

def _currentFormattingState(self): (source)
Undocumented
def insertAtCursor(self, b): (source)
Add one byte to the terminal at the cursor and make consequent state updates.

If b is a carriage return, move the cursor to the beginning of the current row.

If b is a line feed, move the cursor to the next row or scroll down if the cursor is already in the last row.

Otherwise, if b is printable, put it at the cursor position (inserting or overwriting as dictated by the current mode) and move the cursor.

def _emptyLine(self, width): (source)
Undocumented
def _scrollDown(self): (source)
Undocumented
def _scrollUp(self): (source)
Undocumented
def cursorUp(self, n=1): (source)
Undocumented
def cursorDown(self, n=1): (source)
Undocumented
def cursorBackward(self, n=1): (source)
Undocumented
def cursorForward(self, n=1): (source)
Undocumented
def cursorPosition(self, column, line): (source)
Undocumented
def cursorHome(self): (source)
Undocumented
def index(self): (source)
Undocumented
def reverseIndex(self): (source)
Undocumented
def nextLine(self): (source)
Update the cursor position attributes and scroll down if appropriate.
def saveCursor(self): (source)
Undocumented
def restoreCursor(self): (source)
Undocumented
def setModes(self, modes): (source)
Undocumented
def resetModes(self, modes): (source)
Undocumented
def setPrivateModes(self, modes): (source)
Enable the given modes.

Track which modes have been enabled so that the implementations of other insults.ITerminalTransport methods can be properly implemented to respect these settings.

See AlsoresetPrivateModes
insults.ITerminalTransport.setPrivateModes
def resetPrivateModes(self, modes): (source)
Disable the given modes.
See AlsosetPrivateModes
insults.ITerminalTransport.resetPrivateModes
def applicationKeypadMode(self): (source)
Undocumented
def numericKeypadMode(self): (source)
Undocumented
def selectCharacterSet(self, charSet, which): (source)
Undocumented
def shiftIn(self): (source)
Undocumented
def shiftOut(self): (source)
Undocumented
def singleShift2(self): (source)
Undocumented
def singleShift3(self): (source)
Undocumented
def selectGraphicRendition(self, *attributes): (source)
Undocumented
def eraseLine(self): (source)
Undocumented
def eraseToLineEnd(self): (source)
Undocumented
def eraseToLineBeginning(self): (source)
Undocumented
def eraseDisplay(self): (source)
Undocumented
def eraseToDisplayEnd(self): (source)
Undocumented
def eraseToDisplayBeginning(self): (source)
Undocumented
def deleteCharacter(self, n=1): (source)
Undocumented
def insertLine(self, n=1): (source)
Undocumented
def deleteLine(self, n=1): (source)
Undocumented
def reportCursorPosition(self): (source)
Undocumented
def reset(self): (source)
Undocumented
def unhandledControlSequence(self, buf): (source)
Undocumented
def __str__(self): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2015-01-30 14:14:53.