Python version of runall.sh