Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /snap/core20/2582/usr/lib/python3/dist-packages/pyudev/__pycache__/ |
Upload File : |
U װVp � @ s� d Z ddlmZmZmZmZ ddlmZmZ ddl m Z ddlZe � \ZZ G dd� de�Ze � \ZZe � \ZZe � \ZZe � \ZZG dd � d e�ZdS ) a� pyudev.wx ========= Wx integration. :class:`MonitorObserver` integrates device monitoring into the wxPython\_ mainloop by turing device events into wx events. :mod:`wx` from wxPython\_ must be available when importing this module. .. _wxPython: http://wxpython.org/ .. moduleauthor:: Tobias Eberle <tobias.eberle@gmx.de> .. versionadded:: 0.14 � )�print_function�division�unicode_literals�absolute_import)� EvtHandler� PostEvent)�NewEventNc @ sJ e Zd ZdZdd� Zedd� �Zejdd� �Zdd� Zd d � Z dd� Z d S )�MonitorObservera� An observer for device events integrating into the :mod:`wx` mainloop. This class inherits :class:`~wx.EvtHandler` to turn device events into wx events: >>> from pyudev import Context, Monitor >>> from pyudev.wx import MonitorObserver >>> context = Context() >>> monitor = Monitor.from_netlink(context) >>> monitor.filter_by(subsystem='input') >>> observer = MonitorObserver(monitor) >>> def device_event(event): ... print('action {0} on device {1}'.format(event.device.action, event.device)) >>> observer.Bind(EVT_DEVICE_EVENT, device_event) >>> monitor.start() This class is a child of :class:`wx.EvtHandler`. .. versionadded:: 0.17 c C s"