This repository has no description
1import rich_click as click
2from rich.pretty import pprint
3import sys
4
5
6def callback(ctx, param, value):
7 print(ctx, param, value, sys.argv)
8 pprint({k: getattr(ctx, k, None) for k in dir(ctx)})
9 pprint({k: getattr(param, k, None) for k in dir(param)})
10 pprint({k: getattr(value, k, None) for k in dir(value)})
11
12
13@click.command()
14@click.option("-i", "--i", nargs=2, callback=callback)
15def test(i): ...
16
17
18test()
19
20# @click.command()
21# @click.option('paths', '--path', envvar=['PATH', "PATHS"], multiple=True,
22# type=click.Path())
23# def perform(paths):
24# print(paths)
25
26# perform()