4 ms·
Bleh. When you need a in-browser tool to use a library, you really know it's messed up. Isn't there anything like structopt https://docs.rs/structopt/0.3.19/st
by dpc_pw 6y ago
Bleh. When you need a in-browser tool to use a library, you really know it's messed up.
Isn't there anything like structopt https://docs.rs/structopt/0.3.19/structopt/ https://docs.rs/structopt/0.3.19/structopt/ for Python?
- metalliqaz 6y agoLooking at that link, argparse is very similar to structopt. It just uses the syntax and idioms of a different language. The structopt attributes appear to be approx. the same complexity as argparse functions.
- mypalmike 6y agoIndeed. My guess would be that structopt's design was based on Python's argparse, which itself derived from lessons learned from the earlier Python module optparse, which was created around 20 years ago. I'm not sure where declarative CLI argument parsing originated, but I first encountered it in optparse.
- m45t3r 6y agoThere are multiple alternatives for argparse if you look for third-party libraries. The thing that makes argparse particularly useful is because it is in stdlib, so if you use you can create a Python script without external dependencies.