2

我有一段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

我使用 Python 2.7 的 PyScripter IDE,但不确定如何传递参数,IDE 底部有一个 Python Interpreter 窗口。

ide

4

1 回答 1

4

自己找到了解决方案。点击运行菜单会找到命令行参数。然后单击它以输入您想要的内容。

图片

于 2014-06-30T15:17:00.503 回答