python argv传递参数

test.py
import sys
print(sys.argv)

 

python test.py arg1 arg2 arg3

打印["test.py","arg1","arg2","arg3"]

 

posted @ 2017-09-05 09:58  taomin  阅读(230)  评论(0编辑  收藏  举报