python - 如何传递命令行参数 IronPython

标签 python console ironpython argv sharpdevelop

Possible Duplicate:
How can I pass command-line arguments in IronPython?

我是 IronPython 和 Sharpdevelop 的新手,我正在尝试运行以下代码,

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

如何将参数传递到命令行?

最佳答案

SharpDevelop

  • 右键单击 python 项目
  • 在上下文菜单中选择属性
  • 选择调试选项卡
  • 命令行参数字段中附加您的参数

关于python - 如何传递命令行参数 IronPython,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12907167/

相关文章:

ironpython - 字符串为空或空

python - 将二维数组中的每一列与另一个二维数组中的每一列相乘

python - 递归与迭代图遍历中的内存利用率

c# - 如何使用 SetConsoleHandler() 来阻止退出调用

php - 在 symfony2 中从命令行发送电子邮件

c# - 如何判断是否有控制台

c# - 将数组从 IronPython 传递到 C# 库

datetime - 不能在 IronPython 中使用 DateTime

python - 重组数据框中的数据

python - 在线性回归中使用 PCA