philnext
philnext

Reputation: 3402

What is the best way to communicate between Python softwares running on the same computer?

I used MailSlots with Delphi for my softwares when I needed dialogs between them (on MS Windows on the same coputer). Now I need to do the same things but with Python and on MS Windows but also on Linux. So : what is the best way to communicate between Python written software running on the same computer ? For some firewall problemes I would prefer to avoid IP dialogs. As I tested it, I don't want all the DIsk File share solutions.

So in brief :

  • 2 Python software on the same computer need to dialog.
  • No IP
  • No Disk File share.

Upvotes: 1

Views: 400

Answers (3)

Judge Maygarden
Judge Maygarden

Reputation: 27613

The multiprocessing module has Listeners and Clients: "It basically gives a high level message oriented API for dealing with sockets or Windows named pipes."

Upvotes: 2

Andrea
Andrea

Reputation: 20493

On Linux you could use DBus, which has bindings for Python, and actually allows communication between processes even in different languages.

Unfortunately this would not be portable. I don't know what would be suitable on a Windows environment.

Upvotes: 2

Hossein
Hossein

Reputation: 4137

How about one of them being a thread started by the another one?

Upvotes: 0

Related Questions