/usr/share/doc/python-args/README.rst is in python-args 0.1.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | args
====
Argument Parsing for Humans.
Usage
-----
Here's an example application::
import args
print 'Aruments passed in: ' + str(args.all)
print 'Files detected: ' + str(args.files)
print 'NOT files detected: ' + str(args.not_files)
print 'Grouped Arguments: ' + str(args.grouped)
No arguments::
$ tool
Aruments passed in: []
Flags detected: <args []>
Files detected: []
NOT Files detected: <args []>
Grouped Arguments: {'_': <args []>}
A few arguments::
$ tool -s this that --import this and that and this and that
Aruments passed in: ['-s', 'this', 'that', '--import', 'this', 'and', 'that', 'and', 'this', 'and', 'that']
Flags detected: <args ['-s', '--import'Files detected: []
NOT Files detected: <args ['-s', 'this', 'that', '--import', 'this', 'and', 'that', 'and', 'this', 'and', 'that']>
Grouped Arguments: {'--import': <args ['this', 'and', 'that', 'and', 'this', 'and', 'that']>, '_': <args []>, '-s': <args ['this', 'that']>}
A few expanded file arguments::
$ tool *.py
Aruments passed in: ['args.py', 'setup.py']
Flags detected: <args []>
Files detected: ['args.py', 'setup.py']
NOT Files detected: <args []>
Grouped Arguments: {'_': <args ['args.py', 'setup.py']>}
A few non-expanded file arguments::
$ tool '*.py'
Aruments passed in: ['*.py']
Flags detected: <args []>
Files detected: ['args.py', 'setup.py']
NOT Files detected: <args []>
Grouped Arguments: {'_': <args ['*.py']>}
A few mixed files/flags/arguments::
$ tool '*.py' --test test face book -s ~/.ssh
Aruments passed in: ['*.py', '--test', 'test', 'face', 'book', '-s', '/Users/kreitz/.ssh']
Flags detected: <args ['--test', '-s']>
Files detected: ['args.py', 'setup.py', '/Users/kreitz/.ssh/id_rsa', '/Users/kreitz/.ssh/id_rsa.pub', '/Users/kreitz/.ssh/known_hosts']
NOT Files detected: <args ['--test', 'test', 'face', 'book', '-s']>
Grouped Arguments: {'--test': <args ['test', 'face', 'book']>, '_': <args ['*.py']>, '-s': <args ['/Users/kreitz/.ssh']>}
Installation
------------
Installation is simple with pip:
$ pip install args
|