请问python写-h这种该怎么写
python吧
全部回复
仅看楼主
level 1
sittuu
楼主
如题
大佬们,想请问一个问题,python的-h要怎么写呀,就是比如我写一个程序,比如make.py,我想make.py -h 就出现他的帮助文档,这样子应该调用哪个模板呢
2022年07月10日 06点07分
1
吧务
level 12
一周休七日
import sys
if len(sys.argv) > 1:
。。if sys.argv[1] == "-h":
。。。。print("help")
2022年07月10日 08点07分
2
level 1
sittuu
楼主
牛的,谢谢大佬
2022年07月26日 12点07分
4
1