Metadata-Version: 1.0
Name: argparse.extra
Version: 0.0.2
Summary: Additional classes for argparse
Home-page: http://github.com/denz/argparse.extra
Author: Denis Mishchishin
Author-email: dennz78@gmail.com
License: Copyright (c) 2011, Denis Mishchishin
All rights reserved.



argparse.extra is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
Description: Python argparse.ArgumentParser subclass(es)
        -------------------------------------------
        
        Quick example of argparser declaration from dictionary::
            
            import sys
            from argparse.extra import DictArgumentParser
            
            def run_testarg_processing(args, argv):
                print 'testarg argument used'
        
            ARGUMENTS = {'--use-something':{'dest':'use_something',
                                           'action':'store_true',
                                           'default':False},
                         'sub:testarg':{
                             #sub:testarg will create subparser 'testarg'
                             #depth of subargs is unlimited
                             'description':'Test arg subcommand',
                             'help':'Test help'
                             'func':run_testarg_processing,
                             '--use-sub-something':{'dest':'use_sub_something',
                                                           'action':'store_true',
                                                           'default':False},
                         }}
        
            DEFAULTS_ONLY = ['func',]
            def get_argparser(argsdict=ARGUMENTS):
                #always create get_argparser function for your cli apps
                #this will enable easy integration of subsequent applications
                #with your argparser
                return DictArgumentParser(argsdict, DEFAULTS_ONLY)
        
            def main(args=sys.argv):
                args, argv = get_argparser().parse_known_args(args[1:])
                args.func(args, argv)
        
            if __name__ == '__main__':
                main()
        
        
        Installation
        ------------
        
        Try one of these::
        
            python setup.py install
        
            easy_install argparse.extra
        
            pip install argparse.extra
        
Platform: UNKNOWN
Classifier: License :: OSI Approved
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
