擅长:python、mysql、java
<p>虽然我认为@Discord使用设置变量是可行的,但它需要将<code>sys.argv</code>s更改为<code>variableName</code>。</p>
<p>因此,要回答这个问题,应该使用<code>engine.Sys.argv</code>:</p>
<pre><code>List<int> argv = new List<int>();
//Do some stuff and fill argv
engine.Sys.argv=argv;
</code></pre>
<p>参考文献:</p>
<p><a href="http://www.voidspace.org.uk/ironpython/custom_executable.shtml" rel="nofollow">http://www.voidspace.org.uk/ironpython/custom_executable.shtml</a></p>
<p><a href="https://stackoverflow.com/questions/5949735/how-can-i-pass-command-line-arguments-in-ironpython">How can I pass command-line arguments in IronPython?</a></p>