Pipe between current process and other process
I want to make pipe or queue in Python between one process (current) and other existing in system. how can I make it? I know current and other proce开发者_运维知识库ss ID. I work on Windows 32bit.
Like this.
python one_process.py | python the_other_process.py
Make the OS do the work for you.
In one_process.py
, you write to sys.stdout
.
In the_other_process.py
, you read from sys.stdin
.
That's it.
精彩评论