remove shell script and use subprocess.call