multithreading system calls in python

Viewed 4043

I have a python script which is something like that:

def test_run():
     global files_dir
     for f1 in os.listdir(files_dir):
          for f2 os.listdir(files_dir):
               os.system("run program x on f1 and f2")

what is the best way to call each of the os.system calls on different processor? using subprocess or multiprocessing pool?

NOTE : each run of the program will generate an output file.

2 Answers
Related