HTTP Debugging Proxy

Alan Kennedy alanmk at hotmail.com
Wed Jul 21 13:16:54 CEST 2004


[Fuzzyman]
> Xavier Defrang has written an HTTP Debugging Proxy.
> This message is basically for him - since he says on his website that
> he inhabits this newsgroup.
> 
> I downloaded this and ran it , with the following result :
> 
> Traceback (most recent call last):
>  File "D:\Python Projects\cgiproxy\http_debugging_proxy.py", line 34,
> in ?
>    signal.signal(signal.SIGALRM, SIGALRM_handler)
> AttributeError: 'module' object has no attribute 'SIGALRM'
> 
> Is this my fault or yours ? :-)

Yours, for trying to use Unix-only facilities on Windows :-)

The documentation page for the signal module is not very clear about 
this point, probably because there are plenty of exclusions on 
different platforms, and documenting them all explicitly would 
over-complicate the documentation.

There is a hint on the docs for the signal.alarm() function, which 
says "Availability: Unix". IIRC, the code signal.alarm(func) is just a 
wrapper around the code signal.signal(signal.SIGALRM, func).

http://docs.python.org/lib/module-signal.html

Perhaps the platform independent "Timer" object can give you what you 
need?

http://docs.python.org/lib/timer-objects.html

regards,

-- 
alan kennedy
------------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan:              http://xhaus.com/contact/alan



More information about the Python-list mailing list