403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/pyudev/_os/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/pyudev/_os/__pycache__/poll.cpython-39.pyc
a

8g+^�@s\dZddlmZddlmZddlmZddlmZddlZddlmZGdd	�d	e	�Z
dS)
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@sPeZdZdZejejd�Zedd��Z	e
dd��Zdd�Zdd
d�Z
dd
�Zd	S)�PollzwA poll object.

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

    )�r�wcCs||@dkS)Nr�)�events�eventr
r
�3/usr/lib/python3.9/site-packages/pyudev/_os/poll.py�
_has_event.szPoll._has_eventcGsJttj�}|D]2\}}|j�|�}|s4td�|���|�||�q||�S)aGListen 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.

        zUnknown event type: {0!r})r�select�poll�_EVENT_TO_MASK�get�
ValueError�format�register)�clsr�notifier�fdr�maskr
r
r
�
for_events2s

zPoll.for_eventscCs
||_dS)z�Create a poll object for the given ``notifier``.

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

        N)�	_notifier)�selfrr
r
r
�__init__Dsz
Poll.__init__NcCst|�t|jj|���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_eventsrrr)r�timeoutr
r
r
rMs�z	Poll.pollccs�|D]�\}}|�|tj�r*td�|���n|�|tj�rFtd�|���|�|tj�r^|dfV|�|tj�rv|dfV|�|tj�r|dfVqdS)z�Parse ``events``.

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

        Yield all parsed events.

        zFile descriptor not open: {0!r}zError while polling fd: {0!r}rr	�hN)	rrZPOLLNVAL�IOErrorrZPOLLERR�POLLIN�POLLOUTZPOLLHUP)rrrZ
event_maskr
r
r
ras	

zPoll._parse_events)N)�__name__�
__module__�__qualname__�__doc__rr#r$r�staticmethodr�classmethodrrrrr
r
r
r
r$s

	
r)r(Z
__future__rrrrrZpyudev._utilr�objectrr
r
r
r
�<module>s	

Youez - 2016 - github.com/yon3zu
LinuXploit