Re: Calling Exe from Python
I've been using subprocess.call(['name','arg1','arg2']) Works fine. On 2 May 2007 03:48:19 -0700, M Abbas [EMAIL PROTECTED] wrote: Hello Folks, This is what i am required to do. Call an executable from my python script, and when the executable is fininshed running, i should continue with my python script. I have tried os.exec() but it calls the executable and never returns to the calling python script. I tried os.fork it will start an independent process, since logic of my program depends on the results of executable. I am unable to figure, how to do it. Hope you folks would help me. ~JinBaba -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Calling Exe from Python
muhamad.abbas : Hello Folks, This is what i am required to do. Call an executable from my python script, and when the executable is finished running, i should continue with my python script. I have tried os.exec() but it calls the executable and never returns to the calling python script. I tried os.fork it will start an independent process, since logic of my program depends on the results of executable. I am unable to figure, how to do it. Hope you folks would help me. ~JinBaba I use import os os.spawnl(os.P_WAIT, pathToExe, pathToExe, parm1, parm2, parm3, ) Remember that pathToExe must also be the first parameter. There are many other flavors of os.spawn, check documentation! Good luck, Rex -- http://mail.python.org/mailman/listinfo/python-list
Calling Exe from Python
Hello Folks, This is what i am required to do. Call an executable from my python script, and when the executable is finished running, i should continue with my python script. I have tried os.exec() but it calls the executable and never returns to the calling python script. I tried os.fork it will start an independent process, since logic of my program depends on the results of executable. I am unable to figure, how to do it. Hope you folks would help me. ~JinBaba -- http://mail.python.org/mailman/listinfo/python-list
Calling Exe from Python
Hello Folks, This is what i am required to do. Call an executable from my python script, and when the executable is fininshed running, i should continue with my python script. I have tried os.exec() but it calls the executable and never returns to the calling python script. I tried os.fork it will start an independent process, since logic of my program depends on the results of executable. I am unable to figure, how to do it. Hope you folks would help me. ~JinBaba -- http://mail.python.org/mailman/listinfo/python-list
Re: Calling Exe from Python
In [EMAIL PROTECTED], M Abbas wrote: This is what i am required to do. Call an executable from my python script, and when the executable is fininshed running, i should continue with my python script. I have tried os.exec() but it calls the executable and never returns to the calling python script. I tried os.fork it will start an independent process, since logic of my program depends on the results of executable. Take a look at `os.system()` or the `subprocess` module. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list