giraffez/shell.py
def do_table(self, line):
        """Display results in table format"""
        if len(line) > 0:
            if line.strip().lower() == "on":
                log.write("Table ON")
                self.table_output = True
                return
            elif line.strip().lower() == "off":
                log.write("Table OFF")
                self.table_output = False
                return
        log.write("Table output: {}".format("ON" if self.table_output else "OFF"))
def do_table(self, line):
        if len(line) > 0:
            if line.strip().lower() == "on":
                log.write("Table ON")
                self.table_output = True
                return
            elif line.strip().lower() == "off":
                log.write("Table OFF")
                self.table_output = False
                return
        log.write("Table output: {}".format("ON" if self.table_output else "OFF"))
def do_table ( self , line ) : if len ( line ) > 0 : if line . strip ( ) . lower ( ) == "on" : log . write ( "Table ON" ) self . table_output = True return elif line . strip ( ) . lower ( ) == "off" : log . write ( "Table OFF" ) self . table_output = False return log . write ( "Table output: {}" . format ( "ON" if self . table_output else "OFF" ) )
Display results in table format
Display results in table format