2 ms·
Yeah, I would use argparse if I had to support something like that. To be honest, the extent of my command line parsing is almost always just this: try:
by metalliqaz 6y ago
Yeah, I would use argparse if I had to support something like that.
To be honest, the extent of my command line parsing is almost always just this:
try:
infile = sys.argv[1]
outfile = sys.argv[2]
except IndexError:
print(f"Usage: {sys.argv[0]} <infile> <outfile>")