2011-05-15 6 views
-1

다음은 서브 프로세스 모듈을 사용하는 파이썬 코드입니다. 누군가 코드가하는 일을 설명 할 수 있습니까?파이썬 서브 프로세스 호출

process = subprocess.Popen(['aspell', 'list'], 
    stdin = subprocess.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)) 
+0

댓글은 가운데 두 줄에 있습니까? – BoltClock

답변

0

프로세스 목록을 작성하기 위해 정말 잘못 배치 된 스크립트는 인수 목록을 제공합니다. 'stdout'과 'stderr'을 터플로 파이핑하면서 '.join (text)'을 프로세스에 stdin으로 넘겨 준다.

+0

하지만 popen의 프로세스를 설명 할 수 있습니까? – techi

관련 문제