Ejemplo n.º 1
0
    def __init__( self, telnet, display = None, keys = None ):
        telnetlib.emulation.TerminalEmulation.__init__( self, telnet, display, keys )
        CursesDisplay.__init__( telnet, display )
        self.__strStack     = []
        # accumulate characters for sending to the display
        self.__accum        = ''
        self.__keyBuffer    = ''
        self.__blockBuf     = ''

        # the keyboard handler
        self.__keys         = keys

        # the socket IO and telnet line protocol handler
        self.__telnet       = telnet

        """
            the abstract display.  characters are stored here,
            but doesn't actually render the text on-screen
        """
        self.__display      = display

        # The command interpreter is a state machine -- this is the state
        self.__state        = 0
        # from Vt6530
        self.__listeners    = []
        return
Ejemplo n.º 2
0
 def __init__(self, telnet, display=None, keys=None):
     CursesDisplay.__init__(self, telnet, display)
     self.__state = 0
     self.__lastState = 0
     self.__justConnected = True
     self.__lastLine = ""
     return