argue 0.1.3
Python apps deserve a good argument!
Argue
Argue is a command line parser, intended to make writing command line applications easy and painless. It uses built-in Python types (lists, dictionaries, etc) to define options, which makes configuration clear and concise. Additionally it contains possibility to handle subcommands (e.g. git commit or svn obliterate).
Quick example
That's an example of an option definition:
import sys
import argue
@argue.command(usage='%name [-n] MESSAGE')
def main(message, nonewline=('n', False, 'no newline')):
'Simple echo program'
sys.stdout.write(message)
if not nonewline:
sys.stdout.write('\n')
if __name__ == '__main__':
main()
Running this program will print the help:
echo.py [-n] MESSAGE Simple echo program options: -n --nonewline no newline -h --help show help
I think this mostly describes what's going on, except that I'd like to mention one interesting feature - if you are using long name for option, you can use only partial name, for example ./echo.py --nonew a is valid command line. This is also true for subcommands: read about that and everything else you'd like to know in documentation.
v0.1.3 (08-10-2010)
- Added optional long argument value in help view
- Allow short commands to arbitrary length
v0.1.2 (08-02-2010)
- PyPi Release
v0.1.1 (08-02-2010)
- Epic Refactor
v0.1.0 (08-02-2010)
- Initial port of Opster
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| argue-0.1.3.tar.gz (md5) | Source | 2010-09-11 | 9KB | 490 | |
- Author: Kenneth Reitz
- Home Page: http://github.com/kennethreitz/argue
- License: MIT
- Package Index Owner: kennethreitz
- DOAP record: argue-0.1.3.xml
