开发者

python subprocess call [closed]

开发者 https://www.devze.com 2023-03-06 06:20 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消