catching signals in an object

hg hg at nospam.org
Mon Jan 15 05:23:16 EST 2007


Hi,

I need to catch a signal "SIGUSR1" in an object ... and I need the signal
def that traps is to access the object context ... is that possible  ?
(*nix and windows)

ex:

class test:
        def __init__(self):
                self.Set_Signal()

        def Set_Signal(self):
                import signal
                signal.signal(..., Func)
                def Func(.....):
                        #I need to get access to self


or can signal.signal take a method as param ?

Thanks

hg




More information about the Python-list mailing list