• sys argv 是用来获取命令行参数的 sys argv 0 表示代码本身文件路径 所以参数从1开始 以下两个例子说明 1 使用sys argv 的一简单实例 以下是sample1 py文件 import sys os print sys