I need to run 2 different python scripts: script1 and script2 in parallel without any interaction. They are located as the following way:
dir0 contains the file jobcript.py and 2 directories named dir1, dir2. dir1 contains script1 and dir2 contains script2.
The jobscript.txt has the following lines in it.
#!/usr/bin/python
import subprocess
exit_code1 = subprocess.call(["python", "./dir1/script1", "-o"], shell=False)
exit_code2 = subprocess.call(["python", "./dir2/script2", "-o"], shell=False)
I ran the following command in linux:
$ python jobscript.py -o
But this runs in series. How can I run them in parallel? Solution is much appreciated!