#Master script to loop def runcmd(cmd, format='s'): import subprocess proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE) stdout,stderr=proc.communicate() exit_code=proc.wait() return exit_code,stdout,stderr for dir in <list of directories>: cmd ='%s %s %s' % (<path to python>, <path to your script>, dir) exit_code,stdout,stderr = runcmd(cmd)
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.