2010-08-17 56 views

回答

3

像這樣。

python one_process.py | python the_other_process.py 

使操作系統爲您做好工作。

one_process.py,你寫信給sys.stdout

the_other_process.py中,您從sys.stdin讀取。

就是這樣。

+0

+1簡短而甜美 – 2010-08-17 14:25:32