Re:Click – Python library for command-line interfaces
by sophacles on Thursday April 24, 2014 @09:39AM
(#7640161)
Can you provide an example of what you're saying? I've found that argparse.ArgumentParser.parse_known_args() and sub-parsers can do everything I can see click doing. Including lazy loading of plugins and the like.
Re:Click – Python library for command-line interfaces
by the_mitsuhiko on Thursday April 24, 2014 @10:21AM
(#7640396)
Argparse has too magic of a design that you could fully nest it. I tried it many times but you always run into it's limitations.
Links to some open bugs on it:
* http://bugs.python.org/issue13966
* http://bugs.python.org/issue14191
argparse requires the parser to have full knowledge of everything which makes it slow if you add many commands. Biggest problem though is that it's parsing system is a bit broken when it comes to escaping. Options with arguments cannot have values starting with dashes which is problematic for delegating subcommands to other things.
For what I wrote Click for I could not find any alternatives that worked that way besides optparse itself but that is hard to use.