Run an external program from Python?

Joakim Hove hove at phys.ntnu.no
Wed Nov 8 12:10:45 CET 2000


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.

Is there an equivalent system call in Python. [I have checked the
exec* familiy of commands, but they only seem to run python code -
which is not what I want in this case.]

Best regards, 


Joakim Hove

-- 
=== Joakim Hove      www.phys.ntnu.no/~hove/   ======================
# Institutt for fysikk  (735) 93637 / E3-166  |  Skøyensgate 10D    #
# N - 7491 Trondheim    hove at phys.ntnu.no     |  N - 7030 Trondheim #
================================================ 73 93 31 68 ========



More information about the Python-list mailing list