4 ms·
It seems to me that there are a few projects similar this. Here is another, https://pypi.python.org/pypi/Cogs/ https://pypi.python.org/pypi/Cogs/ (conceptualiz
by clarkevans 13y ago
It seems to me that there are a few projects similar this. Here is another, https://pypi.python.org/pypi/Cogs/ https://pypi.python.org/pypi/Cogs/ (conceptualized as a "Makefile" replacement).
I'm wondering if there could be a breakout at the next PyCon to see if we could discuss approaches and come up with a unified way to do convert Python libraries into command line scripts?
- toyg 13y agoYeah, plenty: - Cliff http://cliff.readthedocs.org/en/latest/ http://cliff.readthedocs.org/en/latest/ - docopt http://docopt.org http://docopt.org - argparse - optparse etc etc etc...
- naiquevin 13y agoThere's also Clint by Kenneth Reitz (https://github.com/kennethreitz/clint https://github.com/kennethreitz/clint)
- douglarek 13y agoClint is a cmd tool not parsing tool
- windexh8er 13y agoAnd the author acknowledges that: "There are many alternatives to click and you can have a look at them if you enjoy them better. The obvious ones are optparse and argparse from the standard library. click is actually implemented as a wrapper around optparse and does not implement any parsing itself. The reason it’s not based on argparse is that argparse‘s design does not allow proper nesting of commands by design and has some deficiencies when it comes to POSIX compliant argument handling." What I love about Pocoo is they always have stellar documentation and give clear rationale - from the beginning.
- vonmoltke 13y agoDoes that mean optparse will be maintained along with click? optparse has been deprecated in favor of argparse since 2.7/3.2.
- the_mitsuhiko 13y agoGiven that argparse has known problems and that not all optparse code can be ported to argparse I doubt optparse will ever go away. It's also a very small module and if optparse will ever disappear only a subset of optparse is needed to make click work.
- shill 13y agoAnd if you can't do it with docopt maybe you are doing it wrong.