求助一下各位,请问这个吗,命令怎么操作,为啥会出现这个问题呢

讨论数量: 2
Jason990420

It already told you that

the following arguments are required: -c/--config

D:\>type test.py
import argparse
parser = argparse.ArgumentParser(description='Train config file')
parser.add_argument('-c', '--config', help='path to config file', required=True)
arg = parser.parse_args()
config_path = arg.config
print(f"Path is {config_path}")

D:\>python test.py
usage: test.py [-h] -c CONFIG
test.py: error: the following arguments are required: -c/--config

D:\>python test.py -c c:\windows
Path is c:\windows

D:\>python test.py --config c:\windows
Path is c:\windows
4个月前 评论

求助一下各位大神,写好的python程序,怎么应用到公众号,意思就是如何在公众号使用写好的python程序,如何建立连接

4个月前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!