checking an ip

Radovan Garabik garabik at
Wed Sep 13 17:28:18 CEST 2000

Peter Schneider-Kamp <peter at> wrote:
 : You could do this with the signal module (as proposed by someone),
 : but you really want to have (look in the archives).

and to be more precise, look at yesterday's post labelled
nntplib timeout bug?
interval between posts asking about timeout for sockets is already 
down to 2 days.. great :-)

 : Ian Weeks schrieb:
 :> I would like to know how to see if a certain IP is active. I want to login
 :> using the ftplib module, but when the given IP number does not exist, it
 :> just hangs, or waits for a long time to timeout. Ping has the same problem.
 :> So what I need is a way to say:
 :> # Some pseudo code
 :> ftp = FTP('', timeout='3')
 :> so, if the connection isn't established in 3 seconds, an exception is
 :> raised, or ftp gets value 0.
 :> I guess there is a way to do this, but how? Can anyone help me out?

| Radovan Garabik |
| __..--^^^--..__         garabik @ fmph . uniba . sk       |

More information about the Python-list mailing list