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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to