os.system() with redirection

Alice NgarKit Ko ako at nd.edu
Fri Apr 19 11:16:12 EDT 2002


Hi,
I want to call a program with os.system().  The program redirects output
to file only through >& outputfile.   Here is my script (temp.py).

line = 'protomol temp.conf.PME.Ewald >& run.temp.PME.Ewald'
os.system(line)

>python temp.py
>sh:  run.temp.PME.Ewald:  bad number

Any idea on how to fix it?  Thanks






More information about the Python-list mailing list