Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interprocess communication between independent Python3 scripts

Can we use standard multiprocessing.Queue class for communicating between independent Python3 scripts like

bash% ./aaa.py &
bash% ./bbb.py &

If no, Is there another library like standard multiprocessing module for communicating with independent scripts.

like image 659
shiina Avatar asked Apr 06 '16 02:04

shiina


Video Answer


1 Answers

Take a look at the section on "Listeners and Clients" in the multiprocessing docs; unlike the higher level simpler APIs, these APIs allow you to establish connections by address and authenticate the paired process, which allows two Python scripts to cooperate without having a parent/child relationship.

like image 91
ShadowRanger Avatar answered Sep 24 '22 11:09

ShadowRanger