I get lost with "signal"

Andrew Markebo flognat at flognat.myip.org
Fri Mar 9 17:35:44 EST 2001


By doing 

import signal
dir(signal) 

you can see which signals are there.. 

Or.. 

Rehack the ftp and socket module to use unblocked sockets, and do a
select call when waiting for the server to connect, I have done such
hacks for http.

Shouldn't be too hard copying ftplib.py and socket.py and mess around
with setblocking (before doing connect), and select.. for the first
queries to the server.

        /Andy

/ "Andrea Ciuffoli" <ACIUFFO1 at irf.com> wrote:
| Hi,
| I'm trying to use "signal" library to control that an FTP connection is established within a specified time (e.g. 3 sec) but I got an Attribute error: SIGALRM.
| Is that module supported by Windows NT and 98?
| If not, is there another method to control that the connection is established without problem? How can I know if the server is down?
| Thanks,
| Andrea.



More information about the Python-list mailing list