python 第三方库

1.tqdm 进度条

from tqdm import tqdm

for i in tqdm(range(10000)):
    pass

2.fire 自动创建命令行接口(command line interfaces)

a.单个函数 

import fire
def hello():
    print("hello world!")

if __name__ == '__main__':
    fire.Fire()

b.多个函数  python hello.py hello1 "beijing"

#hello.py

import fire
def hello1(place):
    print("hello world1! I'm in"+place) 
def hello2(name): 
    print("hello world2!"+name) 
if __name__ == '__main__': 
    fire.Fire()

  

  

  

  

猜你喜欢

转载自www.cnblogs.com/alilliam/p/10490157.html