Python I.P.C

Daniel Dittmar daniel.dittmar at sap.com
Fri Oct 10 04:49:34 EDT 2003


Daniel Greenblatt wrote:
> Basically, I have two python processes, a client and a server.
> They are communicating via a socket. If the client can't connect to
> the server, it  starts a new server process, and has to wait until the
> server is up and listening for requests on the socket. Can anyone
> recommend a good way for the client to block until the server is ready
> to do business?

Create a server socket in the client, spawn the server (pass the socket
port), then listen on the server socket until the server connects to it.

The you can remove this socket and start the regular program.

Daniel







More information about the Python-list mailing list