python subprocess call [closed]
The following is a python code using the subprocess module. Can someone explain what the code is doing?
process = subprocess.Popen(['aspell', 'list'],
stdin = subproc开发者_Python百科ess.PIPE, # reading from the op of a pipe.
stdout = subprocess.PIPE) # writing to the i/p of a pipe
(result, stderrdata) = process.communicate(" ".join(text))
Its a really badly laid out script for opening the process aspell giving it the argument list. then piping the stdout and stderr into a tuple while feeding ' '.join(text) as stdin to the process.
精彩评论