[IronPython] Command line

Martin Maly Martin.Maly at microsoft.com
Wed Jun 13 06:58:01 CEST 2007


That seems correct. If I read your message correctly, when you run the .py file directly and rely on the file association, the python file name will get passed to the ipy.exe as full path. It is consistent with what I am seeing with simple test using notepad:

If, from command line I start "x.txt", notepad will launch with the command line:

"C:\WINDOWS\system32\NOTEPAD.EXE" D:\Dev\Gen\bin\Debug\x.txt

Martin

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Iain
Sent: Tuesday, June 12, 2007 9:18 PM
To: Discussion of IronPython
Subject: [IronPython] Command line

If I associate ipy.exe with *.py files then run the IronPython files
directory I am not seeing any command line argument that I try to pass
in to the script.

I have a file called cmdline_test.py with the following two lines,
import System
print System.Environment.CommandLine

If I run "C:\Program Files\IronPython\ipy.exe" cmdline_test.py test I
will get
"C:\Program Files\IronPython\ipy.exe" cmdline_test.py test

If I run cmdline_test.py test I then get
"C:\Program Files\IronPython\ipy.exe"  "C:\Scripts\cmdline_test.py"

Is this the expected behavior?

Thanks

Iain.
_______________________________________________
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