Server : Apache System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : andertr9 ( 1047) PHP Version : 8.2.18 Disable Function : NONE Directory : /lib/python2.7/site-packages/pyudev/ |
Upload File : |
� ݹ�Yc @` s� d Z d d l m Z m Z m Z m Z y d d l m Z Wn! e k r_ d d l m Z n Xd d l m Z d d l m Z d d l m Z m Z m Z m Z d d d g Z d � Z d e f d � � YZ d e f d � � YZ d S( u� pyudev.core =========== Core types and functions of :mod:`pyudev`. .. moduleauthor:: Sebastian Wiesner <lunaryorn@googlemail.com> i ( t print_functiont divisiont unicode_literalst absolute_import( t check_output( t Device( t load_udev_library( t ensure_unicode_stringt ensure_byte_stringt udev_list_iteratet property_value_to_bytesu udev_versionu Contextu Enumeratorc C` s( t t d d g � � } t | j � � S( ul Get the version of the underlying udev library. udev doesn't use a standard major-minor versioning scheme, but instead labels releases with a single consecutive number. Consequently, the version number returned by this function is a single integer, and not a tuple (like for instance the interpreter version in :data:`sys.version_info`). As libudev itself does not provide a function to query the version number, this function calls the ``udevadm`` utilitiy, so be prepared to catch :exc:`~exceptions.EnvironmentError` and :exc:`~subprocess.CalledProcessError` if you call this function. Return the version number as single integer. Raise :exc:`~exceptions.ValueError`, if the version number retrieved from udev could not be converted to an integer. Raise :exc:`~exceptions.EnvironmentError`, if ``udevadm`` was not found, or could not be executed. Raise :exc:`subprocess.CalledProcessError`, if ``udevadm`` returned a non-zero exit code. On Python 2.7 or newer, the ``output`` attribute of this exception is correctly set. .. versionadded:: 0.8 u udevadmu --version( R R t intt strip( t output( ( s/ /usr/lib/python2.7/site-packages/pyudev/core.pyt udev_version. s t Contextc B` sw e Z d Z d � Z d � Z e d � � Z e d � � Z e d � � Z e d � � Z e j d � � Z d � Z RS( u The udev context. This is *the* central object to access udev. An instance of this class must be created before anything else can be done. It holds the udev configuration and provides the interface to list devices (see :meth:`list_devices`). Instances of this class can directly be given as ``udev *`` to functions wrapped through :mod:`ctypes`. c C` s"