|
|
|
|
|
by thrdbndndn
963 days ago
|
|
I'm sure click has its advantage if your CLI is particularly complex, but for me the built-in argparse is more than enough, it has almost all the common things you need. By the way, argparse (and I assume click too) by default allows having positional arguments and switches in any order, i.e., both: mycli pospara0 --switch --option A
mycli --switch --option A pospara0
work. This seems like nothing but I've encountered many CLI utilities written in other languages (particularly, go and node.js) that force you to have switches at the beginning. and I really hate that.I don't know if it's caused by their corresponding default/popular CLI library or what, someone could enlighten me. (Of course, in some cases like things like FFMPEG, the order absolutely matters; but it's not the case for 99% of utilities.) |
|