python getopt使用
python中 getopt 模块,该模块是专门用来处理命令行参数的
函数getopt(args, shortopts, longopts = [])
参数args一般是sys.argv[1:]
shortopts 短格式 (-)
longopts 长格式(--)
命令行中输入:python test.py -i 127.0.0.1 -p 80 55 66python test.py -
转载
2013-12-21 02:46:03 ·
345 阅读 ·
0 评论