Parsing command line arguments in Python
This is one of those posts that I write so that I can look it up again as this information is all over the Internet, but it took me a little while to find what I was looking for. To accept command line arguments in a Python script, use the argparse package: import argparse You can then instantiate a parser and add arguments you want to accept: parser = argparse.ArgumentParser(description="Convert a JSON array to JSONL… continue reading.