How to wait only so long for a server to respond?

Maik Hertha maik.hertha at volkswagen.de
Wed Apr 3 02:11:54 EST 2002


Ralph wrote:

>Pythoners:
>
>I have some code that requests a response from a server on the Internet, 
>but I only want to wait so long for the server to respond.  How can I tell 
>python to wait x seconds/minutes, then move on to the next section of code 
>if the server has not responded?
>
>Thanks as always.
>
>Raplh
>
you should have a look on the signal module.
example is here: http://www.python.org/doc/current/lib/node214.html


-- 

mit freundlichem Gruß /
best regards

Maik Hertha

--------------------------------------------------- h+h
EBSP Anwenderbetreuung, +49 5361 9-74950
Volkswagen AG / Brieffach 1721 / D-38436 Wolfsburg
http://ebsp.wob.vw.de              
maik.hertha at volkswagen.de
---------------------------------------------------
hartmann+hertha
it (beratung / entwicklung / support)
http://www.hartmann-hertha.de
mhertha at hartmann-hertha.de
--------------------------------------------------- h+h





More information about the Python-list mailing list