简体   繁体   English

如何与外部Python进程进行通信? (不是子流程)

[英]How to communicate with an external Python process? (not a subprocess)

The other python process was launched externally, only the process identifier is known. 另一个python进程是从外部启动的,只有进程标识符是已知的。 This external process is not a subprocess launched from a python process. 此外部进程不是从python进程启动的子进程。 The path to both processes could be the same. 这两个过程的路径可能相同。 How do I communicate with that process? 我如何与该过程进行沟通? How can I easily send python data types between these processes? 如何在这些进程之间轻松发送python数据类型?

Best regards, Czarek 最好的问候,Czarek

If you can accept communicating between the processes using a tcp connection, you could use zeromq. 如果您可以接受使用tcp连接在进程之间进行通信,则可以使用zeromq。 http://zeromq.org/ http://zeromq.org/

See these threads for examples: 有关示例,请参见以下线程:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM