Domanda

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 ?

È stato utile?

Soluzione

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

Altri suggerimenti

Does this article help you at all?

You need to set the values of sys.argv.

engine.Sys.argv = List.Make(args);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top