IPC (inter process communication) between python and java

前端 未结 6 1203
暖寄归人
暖寄归人 2020-12-31 04:18

First, a little explanation of why I\'m asking this question in the first place: I\'m writing a python program (with a wxPython gui) that needs to call a Java AWT p

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-31 05:09

    I attempted to code a solution using pipes but it seems that they just aren't well suited to sending multiple messages back and forth with potentially large data attached. Rather, they seem ideal for opening a "worker" style program that runs, responds, and dies.

    Looking into socket programming, I found a fantastic resource here: https://web.archive.org/web/20080913064702/http://www.prasannatech.net/2008/07/socket-programming-tutorial.html

    The tutorial presents TCP and UDP variants of a simple chat program written in 4 languages. I ended up using and modifying the TCP Java client and Python server.

提交回复
热议问题