replace os.system with subprocess.call - add a timeout option in the mix