client-server

How to stop subprocesses that communicate with the main process through request and response queues?

How to stop subprocesses that communicate with the main process through request and response queues? Question: I have a Python program that starts N subprocesses (clients) which send requests to and listen for responses from the main process (server). The interprocess communication uses pipes through multiprocessing.Queue objects according to the following scheme (one queue per …

Total answers: 2

How to execute mpirun or mpiexec command from a python script?

How to execute mpirun or mpiexec command from a python script? Question: I have an MPI application written in C++. When I run the application using mpirun or mpiexec on my local machine shell, it works fine. The problem is that the mpi application should be executed after a request from the network (e.g. HTTP …

Total answers: 3

Unable to open another .py file on exiting the primary .py file

Unable to open another .py file on exiting the primary .py file Question: I have created 2 .py files. i want that once the primary file closes, the second one opens using tkinter. This is a continuation of multiple commands for a tkinter button . The exit button functionality I have written is:- from Backup_Server …

Total answers: 3

What are the value states of read/write in selectors.EVENT_READ | selectors.EVENT_WRITE?

What are the value states of read/write in selectors.EVENT_READ | selectors.EVENT_WRITE? Question: In the question Python – non-blocking sockets using selectors the following code is used: events = selectors.EVENT_READ | selectors.EVENT_WRITE The values of event_read or event_write flags are not mentioned nor explained at https://docs.python.org/3/library/selectors.html. Neither is an explanation give in the select() module or …

Total answers: 1

Socket.IO Client Library in Python

Socket.IO Client Library in Python Question: Can anyone recommend a Socket.IO client library for Python? I’ve had a look around, but the only ones I can find are either server implementations, or depend on a framework such as Twisted. I need a client library that has no dependencies on other frameworks. Simply using one of …

Total answers: 6