1

The other python process was launched externally, only the process identifier is known. This external process is not a subprocess launched from a python process. 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?

Best regards, Czarek

Czarek Tomczak
  • 20,079
  • 5
  • 49
  • 56

1 Answers1

2

If you can accept communicating between the processes using a tcp connection, you could use zeromq. http://zeromq.org/

See these threads for examples:

Community
  • 1
  • 1
davvs
  • 1,029
  • 1
  • 11
  • 18
  • Thanks for the answer. I see that I have to act as some kind of server (listening on tcp://127.0.0.1:5555). This might trigger a firewall asking user to allow/deny it, right? Are there any other alternatives that act more like native IPC messaging seen in C++ programs? – Czarek Tomczak Aug 21 '13 at 09:32
  • I've just found out that there are a few transports available in ZeroMQ: INPROC, IPC, MULTICAST, TCP. Looks like zmq_ipc is what I'm looking for: http://api.zeromq.org/2-1:zmq-ipc – Czarek Tomczak Aug 21 '13 at 09:38