from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument('input_file', type=str) parser.add_argument('output_file', type=str) args = parser.parse_args() import icartt ict = icartt.Dataset(args.input_file) ict.splitChar = ", " with open(args.output_file, 'w') as f: ict.write(f)