(self, event, timeout=None)
Clear an event, execute context and then wait for event

        >>> with gtr.event("connect", 10):
        >>>     gtb.send(connect_command)
Clear an event, execute context and then wait for event
Clear an event execute context and then wait for event
def event(self, event, timeout=None):
        """
        Clear an event, execute context and then wait for event

        >>> with gtr.event("connect", 10):
        >>>     gtb.send(connect_command)

        """
        self.clear(event)
        yield
        self.wait(event, timeout)
def event ( self , event , timeout = None ) : self . clear ( event ) yield self . wait ( event , timeout )