Btw, see the socket.create_connection function from the Python 2.6 standard library for the right way to handle this situation.
Btw, see the socket. create_ connection function from the Python 2.6 standard library for the right way to handle this situation.