Frage

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

I am new to ironpython and sharpdevelop and I am trying to run the following code,

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

How do I pass the arguments to the command line ?

War es hilfreich?

Lösung

In SharpDevelop you

  • right-click on the python project
  • choose Properties in the context-menu
  • choose the Debug-tab
  • append your arguments in the Command line arguments field

Andere Tipps

Does this article help you at all?

You need to set the values of sys.argv.

engine.Sys.argv = List.Make(args);
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top