Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

docopt

Name: Anonymous 2012-10-07 5:06

http://www.youtube.com/watch?v=pXhcPJK5cMc
https://github.com/docopt/docopt

Cool FIOC shit. Generates command line option parser form a documentation text, like this one:


"""Usage: my_program.py [-hso FILE] [--quiet | --verbose] [INPUT ...]

    -h --help    show this
    -s --sorted  sorted output
    -o FILE      specify output file [default: ./test.txt]
    --quiet      print less text
    --verbose    print more text
"""

Name: Anonymous 2012-10-07 5:11

The standard module argparse already does that.

http://docs.python.org/dev/library/argparse.html

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List