� ��:Oc @` s� d Z d d l m Z m Z m Z m Z d d l m Z m Z d d l m Z d d l m Z e � \ Z Z e � \ Z Z e � \ Z Z e � \ Z Z e � \ Z Z d e f d � � YZ d S( u> pyudev.wx ========= Provides :class:`~pyudev.wx.WXUDevMonitorObserver` to integrate a :class:`~pyudev.Monitor` into a :meth:`wx.App.MainLoop`. To use this module, :mod:`wx` from wxPython must be available. .. moduleauthor:: Tobias Eberle <tobias.eberle@gmx.de> .. versionadded:: 0.14 i ( t print_functiont divisiont unicode_literalst absolute_import( t EvtHandlert PostEvent( t NewEvent( t MonitorObservert WxUDevMonitorObserverc B` su e Z d Z i e d 6e d 6e d 6e d 6Z d � Z e d � � Z e j d � � Z d � Z d � Z d � Z RS( u� Observe a :class:`~pyudev.Monitor` and post wx events upon device events: >>> context = pyudev.Context() >>> monitor = pyudev.Monitor.from_netlink(context) >>> monitor.filter_by(subsystem='input') >>> observer = pyudev.wx.WxUDevMonitorObserver(monitor) >>> def device_connected(event): ... print('{0!r} added'.format(event.device)) >>> observer.Bind(EVT_DEVICE_ADDED, device_connected) >>> monitor.start() This class is a child of :class:`wx.EvtHandler`. u addu removeu changeu movec C` s- t j | � | | _ d | _ | j � d S( N( R t __init__t monitort Nonet _observer_threadt start( t selfR ( ( s- /usr/lib/python2.7/site-packages/pyudev/wx.pyR C s c C` s | j d k 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. N( R R ( R ( ( s- /usr/lib/python2.7/site-packages/pyudev/wx.pyt enabledI s c C` s! | r | j � n | j � d S( N( R t stop( R t value( ( s- /usr/lib/python2.7/site-packages/pyudev/wx.pyR S s c C` sB | j d k r d St | j | j d d �| _ | j j � d S( u` Enable this observer. Do nothing, if the observer is already enabled. Nt nameu wx-observer-thread( R R R R t _emit_eventsR ( R ( ( s- /usr/lib/python2.7/site-packages/pyudev/wx.pyR Z s c C` s$ | j d k r d S| j j � d S( ub Disable this observer. Do nothing, if the observer is already disabled. N( R R R ( R ( ( s- /usr/lib/python2.7/site-packages/pyudev/wx.pyR f s c C` sC t | t d | d | � � | j | } t | | d | � � d S( Nt actiont device( R t DeviceEventt _action_event_map( R R R t event_class( ( s- /usr/lib/python2.7/site-packages/pyudev/wx.pyR p s ( t __name__t __module__t __doc__t DeviceAddedEventt DeviceRemovedEventt DeviceChangedEventt DeviceMovedEventR R t propertyR t setterR R R ( ( ( s- /usr/lib/python2.7/site-packages/pyudev/wx.pyR , s N( R t __future__R R R R t wxR R t wx.lib.neweventR t pyudev.monitorR R t EVT_DEVICE_EVENTR t EVT_DEVICE_ADDEDR t EVT_DEVICE_REMOVEDR t EVT_DEVICE_CHANGEDR t EVT_DEVICE_MOVEDR ( ( ( s- /usr/lib/python2.7/site-packages/pyudev/wx.pyt <module> s "
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
.__init__.pyo.40009 | File | 1.21 KB | 0644 |
|
._compat.pyo.40009 | File | 1019 B | 0644 |
|
._libudev.pyo.40009 | File | 8.6 KB | 0644 |
|
._py2util.pyo.40009 | File | 870 B | 0644 |
|
._py3util.pyo.40009 | File | 688 B | 0644 |
|
._qt_base.pyo.40009 | File | 2.48 KB | 0644 |
|
._util.pyo.40009 | File | 5.3 KB | 0644 |
|
.core.pyo.40009 | File | 14.9 KB | 0644 |
|
.device.pyo.40009 | File | 38.74 KB | 0644 |
|
.glib.pyo.40009 | File | 3.42 KB | 0644 |
|
.monitor.pyo.40009 | File | 17.17 KB | 0644 |
|
.pyqt4.pyo.40009 | File | 2.37 KB | 0644 |
|
.pyside.pyo.40009 | File | 2.38 KB | 0644 |
|
.wx.pyo.40009 | File | 3.7 KB | 0644 |
|
__init__.py | File | 1.75 KB | 0644 |
|
__init__.pyc | File | 1.21 KB | 0644 |
|
__init__.pyo | File | 1.21 KB | 0644 |
|
_compat.py | File | 1.44 KB | 0644 |
|
_compat.pyc | File | 1019 B | 0644 |
|
_compat.pyo | File | 1019 B | 0644 |
|
_libudev.py | File | 9.9 KB | 0644 |
|
_libudev.pyc | File | 8.6 KB | 0644 |
|
_libudev.pyo | File | 8.6 KB | 0644 |
|
_py2util.py | File | 1.32 KB | 0644 |
|
_py2util.pyc | File | 870 B | 0644 |
|
_py2util.pyo | File | 870 B | 0644 |
|
_py3util.py | File | 1.19 KB | 0644 |
|
_py3util.pyc | File | 688 B | 0644 |
|
_py3util.pyo | File | 688 B | 0644 |
|
_qt_base.py | File | 2.53 KB | 0644 |
|
_qt_base.pyc | File | 2.48 KB | 0644 |
|
_qt_base.pyo | File | 2.48 KB | 0644 |
|
_util.py | File | 5.62 KB | 0644 |
|
_util.pyc | File | 5.3 KB | 0644 |
|
_util.pyo | File | 5.3 KB | 0644 |
|
core.py | File | 13.66 KB | 0644 |
|
core.pyc | File | 14.9 KB | 0644 |
|
core.pyo | File | 14.9 KB | 0644 |
|
device.py | File | 33.43 KB | 0644 |
|
device.pyc | File | 38.74 KB | 0644 |
|
device.pyo | File | 38.74 KB | 0644 |
|
glib.py | File | 4.49 KB | 0644 |
|
glib.pyc | File | 3.42 KB | 0644 |
|
glib.pyo | File | 3.42 KB | 0644 |
|
monitor.py | File | 16.91 KB | 0644 |
|
monitor.pyc | File | 17.17 KB | 0644 |
|
monitor.pyo | File | 17.17 KB | 0644 |
|
pyqt4.py | File | 2.85 KB | 0644 |
|
pyqt4.pyc | File | 2.37 KB | 0644 |
|
pyqt4.pyo | File | 2.37 KB | 0644 |
|
pyside.py | File | 2.83 KB | 0644 |
|
pyside.pyc | File | 2.38 KB | 0644 |
|
pyside.pyo | File | 2.38 KB | 0644 |
|
wx.py | File | 3.44 KB | 0644 |
|
wx.pyc | File | 3.7 KB | 0644 |
|
wx.pyo | File | 3.7 KB | 0644 |
|