def call_command(self, *args): self.output = StringIO() runner = CommandRunner(list(args), stdout=self.output) runner = self.pre_command_run(runner) try: runner.execute() except SystemExit: pass # Ignore error exits self.output.seek(0) lines = self.output.readlines() self.output.close() return lines
def main(): runner = CommandRunner(sys.argv) runner.execute()