main.py 文件源码

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

项目:alelo_ofx 作者: dantas 项目源码 文件源码
def ask_user(preferences = {}):
    def add_argument(name, help, **kwargs):
        kwargs['required'] = kwargs.get('required', not (name in preferences))
        kwargs['default'] = kwargs.get('default', preferences.get(name, None))
        parser.add_argument('--' + name, help=help, **kwargs)

    parser = argparse.ArgumentParser(description="Access MeuAlelo system to extract this month's operations")

    add_argument('cpf', "CPF with only numbers")
    add_argument('password', "Password used to access the system")
    add_argument('card', "Which card from the list we want to access", type=int, default=0)
    add_argument('save', "If present saves the provided configurations in an init file",
        required=False, action="store_true")
    add_argument('month', "Specify for which month transactions must be converted",
        required=False, type=int)

    return vars(parser.parse_args())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号