I\'ve a python script that has to launch a shell command for every file in a dir:
import os
files = os.listdir(\".\")
for f in files:
os.execlp(\"myscri
subprocess: The
subprocessmodule allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes.
http://docs.python.org/library/subprocess.html
Usage:
import subprocess
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
process.wait()
print process.returncode