subprocess.call ( "python " + pypath + "\\ThiessenCatchments.py " + gp.workspace )
Attribute Error: Object: Environment <workspace> not found.
rootDir = r"D:\temp" script = r"\\snarf\div_lm\script.py" dateTimeStamp = time.strftime('%Y%m%d%H%M%S') for path in sys.path: if os.path.exists(os.path.join(path, "python.exe")) == True: pythonExePath = os.path.join(path, "python.exe") parameterList = [pythonExePath, script, rootDir, dateTimeStamp[:8]] os.spawnv(os.P_WAIT, pythonExePath, parameterList) #or to not wait for the spawned process to finish... os.spawnv(os.P_NOWAIT, pythonExePath, parameterList)
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.