socket bindings

Charles G Waldman cgw at
Tue Jun 15 21:53:43 CEST 1999

Nathan Clegg writes:
 >> ... if I start the application again, it will die, saying
 >> the address is already bound to.

You need to specify the REUSEADDR flag on the socket, like this:

import socket

See the Unix manual pages or any decent network programming book for
more info on setsockopt.

More information about the Python-list mailing list