Run an external program from Python?

Syver Enstad syver at
Wed Nov 8 12:56:49 CET 2000

"Joakim Hove" <hove at> wrote in message
news:k0nsnp2zpl6.fsf at
> Hello,
> I am writing a small python program to automate the compilation of
> another (fortran) program. In this process I need my python program to
> call the "make" program.
> In Perl I would do simply:
>   system("make PROG=Run");
> And the Perl program would wait around till the system call was
> finished.
Yess it is and it's called TADA! system ;-)

So do:
import os
os.system('make PROG=Run')

and the system call blocks too while the other program is running.

More information about the Python-list mailing list