Calling Exe from Python

M

M Abbas

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
 
M

Marc 'BlackJack' Rintsch

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,088
Latest member
JeremyMedl

Latest Threads

Top