def paint ( self , tbl ) : if not isinstance ( tbl , Table ) : logging . error ( "unable to paint table: invalid object" ) return False self . term . stream . write ( self . term . clear ) self . term . stream . write ( str ( tbl ) ) return True
python table printer answer
Paint the table on terminal Currently only print out basic string format
def paint(self, tbl):
        """
        Paint the table on terminal
        Currently only print out basic string format
        """
        if not isinstance(tbl, Table):
            logging.error("unable to paint table: invalid object")
            return False

        self.term.stream.write(self.term.clear)

        self.term.stream.write(str(tbl))
        return True