Run an external program from Python?

Joakim Hove hove at
Wed Nov 8 12:10:45 CET 2000


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

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   ======================
# Institutt for fysikk  (735) 93637 / E3-166  |  Skøyensgate 10D    #
# N - 7491 Trondheim    hove at     |  N - 7030 Trondheim #
================================================ 73 93 31 68 ========

More information about the Python-list mailing list