Clize 3.0b1: An argument parser that draws a CLI from your function sigature

Javier n at nspam.net
Mon Apr 27 18:22:05 CEST 2015


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.



More information about the Python-list mailing list