Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #89452 > unrolled thread
| Started by | Yann Kaiser <kaiser.yann@gmail.com> |
|---|---|
| First post | 2015-04-27 09:02 +0000 |
| Last post | 2015-04-27 16:22 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
Clize 3.0b1: An argument parser that draws a CLI from your function sigature Yann Kaiser <kaiser.yann@gmail.com> - 2015-04-27 09:02 +0000
Re: Clize 3.0b1: An argument parser that draws a CLI from your function sigature Javier <n@nspam.net> - 2015-04-27 16:22 +0000
| From | Yann Kaiser <kaiser.yann@gmail.com> |
|---|---|
| Date | 2015-04-27 09:02 +0000 |
| Subject | Clize 3.0b1: An argument parser that draws a CLI from your function sigature |
| Message-ID | <mailman.40.1430125783.3680.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
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. I am primarily looking for feedback on the documentation contents, and I need to source a FAQ page, but any feedback is welcome! If you are into that sort of thing, I've also just set up a G+ community for it at: https://plus.google.com/communities/101146333300650079362
[toc] | [next] | [standalone]
| From | Javier <n@nspam.net> |
|---|---|
| Date | 2015-04-27 16:22 +0000 |
| Message-ID | <mhlnnd$8sm$1@speranza.aioe.org> |
| In reply to | #89452 |
It would be nice if it could automatically generate the python code
for 'clizing a function', i.e., from the example in
https://clize.readthedocs.org/en/latest/
def hello_world(name=None, no_capitalize=False):
...
being able to do
clize.generate_py_code(hello_world)
which would return something in the fashion of
"""
if __name__ == '__main__':
###process sys.argv
...
name=sys.argv[1]
no_capitalize=...
hello_world(name=name, no_capitalize=no_capitalize)
"""
Sometimes you may want to eliminate dependencies.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web