[英]How to exchange data between two different python processes of different conda environments?
Two python scripts, A and B, have compatibility issues and need separate conda environments for them.两个 python 脚本 A 和 B 存在兼容性问题,需要单独的 conda 环境。 Here's the scenario.
这是场景。 When script A runs, it sends data to process B (Script B is running in a different terminal), and process B returns the output to process A (Process A cannot be put to sleep).
当脚本A运行时,它向进程B发送数据(脚本B在不同的终端运行),进程B返回output给进程A(进程A不能休眠)。 I have been using pickle files for exchanging data between these two processes, but this method seems slow, and I would like to speed it up, which is necessary for my work.
我一直在使用pickle文件在这两个进程之间交换数据,但是这种方法看起来很慢,我想加快速度,这对我的工作来说是必要的。
io.TextIOWrapper
will make communication a lot easier, as easy as working with sockets)io.TextIOWrapper
将使通信更容易,就像使用套接字一样容易)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.