famousopf.blogg.se

Python subprocess pipe
Python subprocess pipe













Error: (6, ‘The handle is invalid’) Traceback (most recent call last): File “”, line 1, in File “…\maya\2009\python\ssgtools\utils\ssgSubProc.py”, line 10, in ssgSubProcGetEnv task = subprocess.Popen(_cmd, cwd=gameRoot, stdout=subprocess.PIPE) #shell=True, File “C:\Program Files (x86)\Autodesk\Maya2009\bin\python25.zip\subprocess.py”, line 586, in init errread, errwrite) = self._get_handles(stdin, stdout, stderr) File “C:\Program Files (x86)\Autodesk\Maya2009\bin\python25.zip\subprocess.py”, line 699, in _get_handles p2cread = self._make_inheritable(p2cread) File “C:\Program Files (x86)\Autodesk\Maya2009\bin\python25.zip\subprocess.py”, line 744, in _make_inheritable DUPLICATE_SAME_ACCESS) WindowsError: (6, ‘The handle is invalid’) Obviously I need the Pipe to retrieve the data I want. I am finding as soon as I introduce the subprocess.PIPE to the mix I get a funky crash. Task = subprocess.Popen(_cmd, cwd=gameRoot, stdout=subprocess.PIPE) #shell=True, GameRoot=os.environ.get("GAME_ROOT") + '\ ools\\options' Maya is running within our shell, that is setup via batch at Maya launch. I am running subprocess.Popen() from within a script called within Maya to do this. I’m trying to use subprocess to gather some information from one of our tools that needs to be run via cmd line within our shell.















Python subprocess pipe