from sys import argv
script, first, second, third = argv
#定义四个输入参数
print "The script is called:", script
print "Your first variable is:", first
print "Your second variable is:", second
print "Your third variable is:", third
##cmd运行 需要用户在命令行输入参数
>>>python ex13.py stuff things that
The script is called: ex13.py
Your first variable is: stuff
Your second variable is: things
Your third variable is: that
#在脚本执行中输入
raw_input = ("Your first variable is:")
>>> python ex12.py
>Your first variable is:apple