cli.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:stack-updater 作者: allatrack 项目源码 文件源码
def __init__(self, base_path):
        """
        Initialize CLI arguments
        """
        parser = argparse.ArgumentParser(
            description='Check dependencies by recipe.')
        parser.add_argument('action', choices=['get', 'install', 'check'],
                            default='check', nargs=1,
                            help='get: Download recipe from Gist; \ninstall: '
                                 'Trying to install newer package versions; '
                                 '\ncheck: Simple check')
        parser.add_argument('param', nargs='?',
                            help='Custom recipe directory or gist ID '
                                 'to download recipe')
        parser.add_argument("-v", "--verbose", action="store_true",
                            help="With this flag you can see on the display"
                                 "(not in the log file) "
                                 "triggered command output.")

        self.__cli_args = parser.parse_args()

        self.__base_path = base_path
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号