def __enter__(self):
        """
        Create a timeout if seconds is specified.
        """
        if self.seconds:
            signal.signal(signal.SIGALRM, self.handler)
            signal.alarm(self.seconds)
def __enter__ ( self ) : if self . seconds : signal . signal ( signal . SIGALRM , self . handler ) signal . alarm ( self . seconds )
Create a timeout if seconds is specified.