[Pythonmac-SIG] reposting: Q: emulating os.system() on macs?

Giorgio Brajnik giorgio@dimi.uniud.it
Thu, 2 Dec 1999 14:20:26 +0100 (MET)


[this is a reposting, hoping that some Mac guru could help me]

Hi.

I'm in the process of planning to port a Python application that
is being developed on Linux to the Mac. One of the many questions I
have is how to emulate in Python/Mac something like:


def doit(infile, outfile, errfile, exefile):
    """
    execute "exefile" on "infile" and write "outfile" and "errfile"
    """
    cmd = '%s < "%s" > "%s" 2> "%s"'%(exefile, infile, outfile, errfile)
    os.system(cmd)
    return (outfile, errfile)

Any suggestion?

        Giorgio Brajnik
______________________________________________________________________
Dip. di Matematica e Informatica   | voice: +39 (432) 55.8445
Universita` di Udine               | fax:   +39 (432) 55.8499
Via delle Scienze, 206             | email: giorgio@dimi.uniud.it
Loc. Rizzi -- 33100 Udine -- ITALY | http://www.dimi.uniud.it/~giorgio
------- End of forwarded message -------