ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     3
W                 @   s\   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlZddlmZ G dd	 d	e	Z
dS )
z
    pyudev._os.poll
    ===============

    Operating system interface for pyudev.

    .. moduleauthor:: Sebastian Wiesner  <lunaryorn@gmail.com>
    )absolute_import)division)print_function)unicode_literalsN)eintr_retry_callc               @   sP   e Zd ZdZejejdZedd Z	e
dd Zdd Zdd
dZdd Zd	S )PollzwA poll object.

    This object essentially provides a more convenient interface around
    :class:`select.poll`.

    )rwc             C   s   | |@ dkS )Nr    )eventseventr
   r
   /usr/lib/python3.6/poll.py
_has_event1   s    zPoll._has_eventc             G   sN   t tj}x:|D ]2\}}| jj|}|s6tdj||j|| qW | |S )aG  Listen for ``events``.

        ``events`` is a list of ``(fd, event)`` pairs, where ``fd`` is a file
        descriptor or file object and ``event`` either ``'r'`` or ``'w'``.  If
        ``r``, listen for whether that is ready to be read.  If ``w``, listen
        for whether the channel is ready to be written to.

        zUnknown event type: {0!r})r   selectpoll_EVENT_TO_MASKget
ValueErrorformatregister)clsr   notifierfdr   maskr
   r
   r   
for_events5   s    

zPoll.for_eventsc             C   s
   || _ dS )zCreate a poll object for the given ``notifier``.

        ``notifier`` is the :class:`select.poll` object wrapped by the new poll
        object.

        N)	_notifier)selfr   r
   r
   r   __init__G   s    zPoll.__init__Nc             C   s   t | jt| jj|S )a{  Poll for events.

        ``timeout`` is an integer specifying how long to wait for events (in
        milliseconds).  If omitted, ``None`` or negative, wait until an event
        occurs.

        Return a list of all events that occurred before ``timeout``, where
        each event is a pair ``(fd, event)``. ``fd`` is the integral file
        descriptor, and ``event`` a string indicating the event type.  If
        ``'r'``, there is data to read from ``fd``.  If ``'w'``, ``fd`` is
        writable without blocking now.  If ``'h'``, the file descriptor was
        hung up (i.e. the remote side of a pipe was closed).

        )list_parse_eventsr   r   r   )r   Ztimeoutr
   r
   r   r   P   s    z	Poll.pollc             c   s   x|D ]\}}| j |tjr,tdj|n| j |tjrHtdj|| j |tjr`|dfV  | j |tjrx|dfV  | j |tjr|dfV  qW dS )zParse ``events``.

        ``events`` is a list of events as returned by
        :meth:`select.poll.poll()`.

        Yield all parsed events.

        zFile descriptor not open: {0!r}zError while polling fd: {0!r}r   r	   hN)	r   r   ZPOLLNVALIOErrorr   ZPOLLERRPOLLINPOLLOUTZPOLLHUP)r   r   r   Z
event_maskr
   r
   r   r   c   s    	

zPoll._parse_events)N)__name__
__module____qualname____doc__r   r"   r#   r   staticmethodr   classmethodr   r   r   r   r
   r
   r
   r   r   &   s   
	
r   )r'   Z
__future__r   r   r   r   r   Zpyudev._utilr   objectr   r
   r
   r
   r   <module>   s   