from sys import argv script, first, second, third = argv print "The script is called:", script print "Your first variavle is:", first print "Your second variavle is:", second print "Your third variavle is:", third
可以使用sys模块的argv类读取参数
用户执行命令时就输入,本例中有三个参数。