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: Files detected: [] NOT Files detected: Grouped Arguments: {'_': } 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: Grouped Arguments: {'--import': , '_': , '-s': } A few expanded file arguments:: $ tool *.py Aruments passed in: ['args.py', 'setup.py'] Flags detected: Files detected: ['args.py', 'setup.py'] NOT Files detected: Grouped Arguments: {'_': } A few non-expanded file arguments:: $ tool '*.py' Aruments passed in: ['*.py'] Flags detected: Files detected: ['args.py', 'setup.py'] NOT Files detected: Grouped Arguments: {'_': } 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: 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: Grouped Arguments: {'--test': , '_': , '-s': } Installation ------------ Installation is simple with pip: $ pip install args