(self, timeout=None)
return result
Poll for events.
        timeout can be a float in seconds, or None for no timeout.
        Returns a list of (descriptor, event) pairs.
Poll for events.
        timeout can be a float in seconds, or None for no timeout.
        Returns a list of (descriptor, event) pairs.
Poll for events . timeout can be a float in seconds or None for no timeout . Returns a list of ( descriptor event ) pairs .
def poll(self, timeout=None):
        """
        Poll for events.
        timeout can be a float in seconds, or None for no timeout.
        Returns a list of (descriptor, event) pairs.
        """
        next_usb_timeout = self.__context.getNextTimeout()
        if timeout is None or timeout < 0:
            usb_timeout = next_usb_timeout
        elif next_usb_timeout:
            usb_timeout = min(next_usb_timeout, timeout)
        else:
            usb_timeout = timeout
        event_list = self.__poller.poll(usb_timeout)
        if event_list:
            fd_set = self.__fd_set
            result = [(x, y) for x, y in event_list if x not in fd_set]
            if len(result) != len(event_list):
                self.__context.handleEventsTimeout()
        else:
            result = event_list
            self.__context.handleEventsTimeout()
        return result
def poll ( self , timeout = None ) : next_usb_timeout = self . __context . getNextTimeout ( ) if timeout is None or timeout < 0 : usb_timeout = next_usb_timeout elif next_usb_timeout : usb_timeout = min ( next_usb_timeout , timeout ) else : usb_timeout = timeout event_list = self . __poller . poll ( usb_timeout ) if event_list : fd_set = self . __fd_set result = [ ( x , y ) for x , y in event_list if x not in fd_set ] if len ( result ) != len ( event_list ) : self . __context . handleEventsTimeout ( ) else : result = event_list self . __context . handleEventsTimeout ( ) return result