4 ms·
Python Fire looks much more concise. But do you know of any other languages that handles argument parsing better then Python ?
by bibyte 8y ago
Python Fire looks much more concise. But do you know of any other languages that handles argument parsing better then Python ?
- agigao 8y agoClojure.
- bibyte 8y agoCan you please post a hello world example ?
- vbsteven 8y agoInstalled by default I cannot find any. But pretty much any language with a package manager has sane and easy to use libraries to bang out a small CLI app with subcommands and option parsing in minutes. For example PicoCli in Java, Thor in Ruby and Clap in Rust.
- atoav 8y agoHave you tried looking at docopt? There are cases where it is not flexible enough but it is good for quick and dirty little scripts because: * you use the docstring to generate the args. This way you always have a minimum usage that is valid * Argument parsing is a bit more limited than doimg it yourself, but everything you usually need is there * Docopt is exists not only for Python, but many other languages implemented it too.
- singingfish 8y agoPerl has the problem of too many ways to do it. I like MooX::Options. Example here: https://metacpan.org/source/GETTY/AquariumHive-0.003/lib/App/AquariumHive.pm https://metacpan.org/source/GETTY/AquariumHive-0.003/lib/App...