def run(self): args = self.arguments() if (args.filenames): csvobject = CSVParser(args.filenames[0], args.filenames[1]) csvobject.format_csv_files() elif (args.output): print('We are connecting to the database...') db = MySQL() # Here is where you would pass in a MySQL connection db.write_to_file('SELECT * from foobar', args.output[0]) else: assert False, "Unhandled"