开发者

Pipe between current process and other process

开发者 https://www.devze.com 2023-01-12 11:10 出处:网络
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 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.

0

精彩评论

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