Howto Launch a windows application ?

stef mientki stef.mientki at gmail.com
Wed Oct 3 17:39:49 EDT 2007


hello,

I'm trying to launch a windows application,
but as many others on this list, I've some trouble.
I read some other threads about this topic,
but sorry, I still don't understand all this (never heard of pipes).

When I use a batch file, I can launch the bat-file from python,
and the windows application launched from the batchfile is run perfectly.

Now when I try to run the same windows application from Popen or call,
nothing happens (or at least it's very fast and produces not the 
expected output).

Please enlighten me, preferable in "windows-terminology"  ;-)

thanks,
Stef Mientki

from subprocess import *

cmd =[]
cmd.append ( 'D:\\PIC-tools\\JALxxx\\jalv2_3.exe' )
cmd.append ( '-long-start' )
cmd.append ( '-d')
cmd.append ( '-clear' )
cmd.append ( '-sD:\\PIC-tools\\JAL\\libs2' )
cmd.append ( 'd:\\pic-tools\\jal\\programs\\test_rs232\\test_rs232_hw.jal' )
cmd.append ( '>d:\\data_actueel\\d7_test_browser\\temp.log' )

# DOESN'T WORK
result = call ( cmd )

# Both Popen and call work
cmd = [ 'd:\\data_actueel\\d7_test_browser\\JALcc.bat' ]
#output = Popen ( cmd )
result = call ( cmd )
print result




More information about the Python-list mailing list