Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/pyudev/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/pyudev/glib.pyo
�
��:Oc@`sjdZddlmZmZmZmZddlZddlZdejfd��YZ	ej
e	�dS(u�
    pyudev.pygtk
    ============

    Provide :class:`~pyudev.glib.GUDevMonitorObserver` to integrate a
    :class:`~pyudev.Monitor` into a :class:`glib.MainLoop`.

    To use this module, :mod:`glib` and :mod:`gobject` from PyGObject_ must be
    available.  PyGtk is not required.

    .. _PyGObject: http://www.pygtk.org/

    .. moduleauthor::  Sebastian Wiesner  <lunaryorn@googlemail.com>
    .. versionadded:: 0.7
i(tprint_functiontdivisiontunicode_literalstabsolute_importNtGUDevMonitorObservercB`seZdZidd6dd6dd6dd6Ziejejejejffe	d	�6ejejejffe	d�6ejejejffe	d�6ejejejffe	d�6ejejejffe	d�6Z
d
�Zed��Z
e
jd��Z
d
�ZRS(u
    Observe a :class:`~pyudev.Monitor` and emit Glib signals upon device
    events:

    >>> context = pyudev.Context()
    >>> monitor = pyudev.Monitor.from_netlink(context)
    >>> monitor.filter_by(subsystem='input')
    >>> observer = pyudev.pygtk.GUDevMonitorObserver(monitor)
    >>> def device_connected(observer, device):
    ...     print('{0!r} added'.format(device))
    >>> observer.connect('device-added', device_connected)
    >>> monitor.start()

    This class is a child of :class:`gobject.GObject`.
    udevice-addeduaddudevice-removeduremoveudevice-changeduchangeudevice-movedumoveudevice-eventcC`s/tjj|�||_d|_t|_dS(N(tgobjecttGObjectt__init__tmonitortNonetevent_sourcetTruetenabled(tselfR((s//usr/lib/python2.7/site-packages/pyudev/glib.pyRTs		cC`s
|jdk	S(u�
        Whether this observer is enabled or not.

        If ``True`` (the default), this observer is enabled, and emits events.
        Otherwise it is disabled and does not emit any events.

        .. versionadded:: 0.14
        N(R
R	(R
((s//usr/lib/python2.7/site-packages/pyudev/glib.pyRZs
cC`sf|r9|jdkr9tj|jtj|j�|_n)|rb|jdk	rbtj|j�ndS(N(R
R	tglibtio_add_watchRtIO_INt_process_udev_eventt
source_remove(R
tvalue((s//usr/lib/python2.7/site-packages/pyudev/glib.pyRfs
cC`sd|tjkr`|jj�}|r`|\}}|jd||�|j|j||�q`ntS(Nudevice-event(RRRtreceive_devicetemitt_action_signal_mapR(R
tsourcet	conditionteventtactiontdevice((s//usr/lib/python2.7/site-packages/pyudev/glib.pyRns(t__name__t
__module__t__doc__RRtSIGNAL_RUN_LASTt	TYPE_NONEtTYPE_STRINGt
TYPE_PYOBJECTtstrt__gsignals__RtpropertyRtsetterR(((s//usr/lib/python2.7/site-packages/pyudev/glib.pyR,s&	(Rt
__future__RRRRRRRRt
type_register(((s//usr/lib/python2.7/site-packages/pyudev/glib.pyt<module> s
"L

ZeroDay Forums Mini