With the newest jython version, you should be able to say:
os.system( 'my.exe argument1 argument2' )
You might have to use quoting for arguments containing blanks.
Here is a very simple example that works for me (Win2K):
Jython 2.1 on java1.3.0 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> import os
>>> os.system( 'notepad.exe' )
>>> os.system( 'notepad.exe temp.txt' )
>>> os.system( 'notepad.exe "temp file.txt"' )
Hope this helps a little,
[ Schmidt, Dietrich ]
> I want to run a user written WNT 4.0 EXE file with a command=20
> line argument
> from within a JPython script. How can I do this ?
Just a small documentation issue:
in http://www.jython.org/docs/differences.html maybe os.system() could be
mentioned as 'running on some platforms' ? Currently it says:
popen() and system() are missing. Jython should be fixed, patches would be