11

I have 2 programs that are both in python, one is 3rd Party and already been made. I want to run one in the foreground and one in the background. I want to set up a communication between the 2 programs, so I can tell the one in the foreground to do something, and it then tell the other program to do something. Such as on the foreground program I press a button, which then tell the other program to do something. What is the best way to do bout this?

I know I have asked a question about this before, but I feel that people might have found that too specific, so I have written a more simplified question.

asked Mar 4, 2013 at 16:45
5
  • 3
    have you read this? Commented Mar 4, 2013 at 16:46
  • You don't need to make two programs. Just create a thread in the main program that will do the job. Commented Mar 4, 2013 at 16:49
  • look my answer at: stackoverflow.com/questions/16213235/… Commented Apr 26, 2013 at 8:46
  • look my answer at: stackoverflow.com/questions/16213235/… Commented Apr 26, 2013 at 8:47
  • in this stack overflow post various solutions are proposed, including sockets, IPC, Posix based messages, DBUS , Multi Processing module etc .. At least one of them should be found useful for such circumstances .. Commented Nov 16, 2023 at 12:40

1 Answer 1

6

From my experience, rpyc is by far the simplest, most elegant, and most flexible way to go about it. http://rpyc.readthedocs.org/en/latest/

answered Mar 4, 2013 at 17:27
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.