Have you looked into docopt? -Modulok-
On Fri, Jun 28, 2013 at 7:36 PM, Ethan Furman <et...@stoneleaf.us> wrote: > On 06/27/2013 03:49 PM, Steven D'Aprano wrote: > >> >> [rant] >> I think it is lousy design for a framework like argparse to raise a >> custom ArgumentError in one part of the code, only to catch it elsewhere >> and call sys.exit. At the very least, that ought to be a config option, >> and off by default. >> >> Libraries should not call sys.exit, or raise SystemExit. Whether to quit >> or not is not the library's decision to make, that decision belongs to >> the application layer. Yes, the application could always catch >> SystemExit, but it shouldn't have to. >> > > So a library that is explicitly designed to make command-line scripts > easier and friendlier should quit with a traceback? > > Really? > > -- > ~Ethan~ > -- > http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list> >
-- http://mail.python.org/mailman/listinfo/python-list