[英]Execute a python file with arguments with PyScripter
我有一段python代码。
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
我将PyScripter IDE用于Python 2.7,但不确定如何使用它传递参数,IDE底部有一个Python解释器窗口。
自己找到解决方案。 单击“运行菜单”将找到命令行参数。 然后单击它以输入所需的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.