(self, term)
Prints the terminal's screen and renditions to stdout so they can be
        examined more closely.

        .. note:: Can only be called from a JavaScript console like so...

        .. code-block:: javascript

            GateOne.ws.send(JSON.stringify({'terminal:debug_terminal': *term*}));
Prints the terminal's screen and renditions to stdout so they can be
        examined more closely.
Prints the terminal s screen and renditions to stdout so they can be examined more closely .
def debug_terminal(self, term):
        """
        Prints the terminal's screen and renditions to stdout so they can be
        examined more closely.

        .. note:: Can only be called from a JavaScript console like so...

        .. code-block:: javascript

            GateOne.ws.send(JSON.stringify({'terminal:debug_terminal': *term*}));
        """
        m = self.loc_terms[term]['multiplex']
        term_obj = m.term
        screen = term_obj.screen
        renditions = term_obj.renditions
        for i, line in enumerate(screen):
            # This gets rid of images:
            line = [a for a in line if len(a) == 1]
            logging.info("%s:%s" % (i, "".join(line)))
            logging.info(renditions[i])
        try:
            from pympler import asizeof
            logging.info("screen size: %s" % asizeof.asizeof(screen))
            logging.info("renditions size: %s" % asizeof.asizeof(renditions))
            logging.info(
                "Total term object size: %s" % asizeof.asizeof(term_obj))
        except ImportError:
            pass # No biggie
        self.ws.debug()
def debug_terminal ( self , term ) : m = self . loc_terms [ term ] [ 'multiplex' ] term_obj = m . term screen = term_obj . screen renditions = term_obj . renditions for i , line in enumerate ( screen ) : # This gets rid of images: line = [ a for a in line if len ( a ) == 1 ] logging . info ( "%s:%s" % ( i , "" . join ( line ) ) ) logging . info ( renditions [ i ] ) try : from pympler import asizeof logging . info ( "screen size: %s" % asizeof . asizeof ( screen ) ) logging . info ( "renditions size: %s" % asizeof . asizeof ( renditions ) ) logging . info ( "Total term object size: %s" % asizeof . asizeof ( term_obj ) ) except ImportError : pass # No biggie self . ws . debug ( )