Home

Hello Worsssld!

hello world!

tech blog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import fire

def hello(name):
return 'hello {}'.format(name)

def pathname(base, *path):
'''
usage:
python fire_test.py /home ../*
'''

print(base)
print(path)

def kwargs_test(base, **path):
'''
usage:
python fire_test.py hello --dog1 qq --dog2 gg
'''

print(base)
print(path)

if __name__ == '__main__':
fire.Fire(pathname)
# fire.Fire(kwargs_test)