python 脚本向同一网络上另一个工作站上正在运行的另一个 python 脚本发送信号

spe*_*zor 3 python

我已经在网络上的工作站 1 上运行了一个 python 应用程序。在同一网络上的工作站 2 上,我想运行另一个 python 应用程序,该应用程序向已运行的工作站 1 python 应用程序发送信号,就像我按下工作站 1 上的按钮一样,触发一个功能。工作站混合运行 Windows 和 OSX。这可能吗?

Gui*_*ido 5

您应该使用套接字,这里的示例正是您正在寻找的:

https://docs.python.org/2/library/socket.html#example