diff --git a/src/runalyzer.py b/src/runalyzer.py index 0481adb8c599ceca75e68fce10f78bd4254acd49..7110fdbf3ec0da7c568107772a8325cd517c6735 100644 --- a/src/runalyzer.py +++ b/src/runalyzer.py @@ -116,13 +116,16 @@ class RunDB(object): if self.interactive: show() - def print_cursor(self, cursor): + def table_from_cursor(self, cursor): from pytools import Table tbl = Table() tbl.add_row([column[0] for column in cursor.description]) for row in cursor: tbl.add_row(row) - print tbl + return tbl + + def print_cursor(self, cursor): + print self.table_from_cursor(cursor)