Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #89472 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2015-04-28 10:03 +1000 |
| Last post | 2015-04-28 10:03 +1000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Clize 3.0b1: An argument parser that draws a CLI from your function sigature Chris Angelico <rosuav@gmail.com> - 2015-04-28 10:03 +1000
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2015-04-28 10:03 +1000 |
| Subject | Re: Clize 3.0b1: An argument parser that draws a CLI from your function sigature |
| Message-ID | <mailman.51.1430179419.3680.python-list@python.org> |
On Mon, Apr 27, 2015 at 7:02 PM, Yann Kaiser <kaiser.yann@gmail.com> wrote: > Hello everyone! > > After a few years in development, I am proud to say Clize is landing its > feet again and is now in beta for an upcoming release. > > You can try it out using pip install --user clize=3.0b1 and you can > browse the docs at https://clize.readthedocs.org/ > > For those who'd like an explanation before clicking links, here's Clize's > 5-bullet point explanation: > > * Command-line interfaces are created by passing functions to `clize.run`. > * Parameter types are deduced from the functions' parameters. > * A ``--help`` message is generated from your docstrings. (Why does this > still need to be a bullet point?) > * Decorators can be used to reuse functionality across functions. > * Clize can be extended with new parameter behavior. Interesting. I've also been working on a simpler arg handling module; maybe we can work together. The goals for mine are: * Each function should be as independent as possible. * Minimize repetition (of names, descriptions, etc) * Keep everything in the function signature * Simplify the basic and obvious usages https://github.com/Rosuav/docstringargs https://pypi.python.org/pypi/docstringargs/ There's a demo file in the source repo, plus here are a couple of actual usage examples: https://github.com/Rosuav/LetMeKnow/blob/master/letmeknow.py https://github.com/MikeiLL/appension/blob/master/fore/database.py The latter is an existing module in an existing project, and it grew a command-line interface with minimal changes, eg: https://github.com/MikeiLL/appension/commit/566f195 Can we merge our plans and make a single module that's more likely to be maintained long-term? No point over-duplicating! ChrisA
Back to top | Article view | comp.lang.python
csiph-web