[IronPython] Values of sys.argv do not show when .exe IP program is executed.
Dino Viehland
dinov at exchange.microsoft.com
Fri Feb 3 17:49:57 CET 2006
It's just an oversight - We're not setting sys.argv in PythonEngine.ExecuteCompiled, so we just need to do:
engine.sys.argv = List.Make(Environment.GetCommandLineArgs());
then you should get the arguments.
Thanks for the report - I'll get a bug opened on it for beta 3.
-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Paparipote .
Sent: Friday, February 03, 2006 8:44 AM
To: users at lists.ironpython.com
Subject: [IronPython] Values of sys.argv do not show when .exe IP program is executed.
Hello:
I have the next code in a file named test.py:
import sys
for i in sys.argv:
print i
when running the next command: ironpythonconsole test.py one two three four
It gets:
test.py
one
two
three
four
I could see that IP generates .exe files; it is a good thing. All programs I
made until now work well when I invoke the .exe ones. In the case of
test.exe, however, the parameters are not shown when I execute in this way:
$ Test one two three four
$
What is wrong?
Best regards.
_________________________________________________________________
Charla con tus amigos en línea mediante MSN Messenger:
http://messenger.latam.msn.com/
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
More information about the Ironpython-users
mailing list