#! /usr/bin/env python import subprocess, re, os, time, random rotdat = ['z_phi.dat', 'y_theta.dat'] for dat in rotdat: if ('y_theta' in dat): subprocess.call("python3 harmonic_fit_rot.py " + dat, shell = True) if ('z_phi' in dat): subprocess.call("python3 harmonic_fit_rot_phi.py " + dat, shell = True)