def invoke(self, args, from_tty): from heap.query import do_query from heap.parser import ParserError try: do_query(args) except ParserError as e: print(e)