[IronPython] help: ironpy 1.1.1: clr.Reference(Array[str]) works in interactive mode but not in script
Liwei Peng
liwei.peng at gmail.com
Wed Jul 2 01:16:16 CEST 2008
Hi Iron python team,
I have trouble when using *clr.Reference(Array[str]…)* in the following
python script. When I ran the script line by line under interactive mode
ipy.exe, no issue is found. When I ran it with "ipy.exe a.py", I got the
following error:
Traceback (most recent call last):
File d:\tools\IronPython-1.1.1\a.py, line 12, in Initialize
File , line 0, in NonDefaultNew##12
File , line 0, in .ctor##14
# ironpython 1.1.1. how to run: ipy.exe a.py
#
import sys
import clr
import System
argarray = System.Array[str](sys.argv)
# the following doesn't work when running in a python script.
# it works from interactive ipy.exe
*argarrayref = clr.Reference[ System.Array[str] ]( argarray )*
My OS: W2k8 x64 server.
Can you help on the issue? Thanks,
Liwei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080701/50be18fe/attachment.html>
More information about the Ironpython-users
mailing list