1
我想在一個進程(當前)和系統中其他現有進程之間建立Python或Python隊列。我怎麼能做到這一點?我知道當前和其他進程ID。 我在Windows 32bit上工作。當前進程和其他進程之間的管道
我想在一個進程(當前)和系統中其他現有進程之間建立Python或Python隊列。我怎麼能做到這一點?我知道當前和其他進程ID。 我在Windows 32bit上工作。當前進程和其他進程之間的管道
像這樣。
python one_process.py | python the_other_process.py
使操作系統爲您做好工作。
在one_process.py
,你寫信給sys.stdout
。
在the_other_process.py
中,您從sys.stdin
讀取。
就是這樣。
+1簡短而甜美 – 2010-08-17 14:25:32