??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
σ
έΉYc @` sΧ d Z d d l m Z m Z m Z m Z d d l Z d d l Z d d l Z d d l Z e j
d d k rx d d l Tn
d d l Td Z
d Z d Z d Z d
Z e j Z e j Z d Z d Z d S(
u
pyudev._util
============
Internal utilities
.. moduleauthor:: Sebastian Wiesner
i ( t print_functiont divisiont unicode_literalst absolute_importNi ( t *c C` s+ t | t s' | j t j } n | S( uΰ
Return the given ``value`` as bytestring.
If the given ``value`` is not a byte string, but a real unicode string, it
is encoded with the filesystem encoding (as in
:func:`sys.getfilesystemencoding()`).
( t
isinstancet bytest encodet syst getfilesystemencoding( t value( ( s0 /usr/lib/python2.7/site-packages/pyudev/_util.pyt ensure_byte_string, s c C` s+ t | t s' | j t j } n | S( uί
Return the given ``value`` as unicode string.
If the given ``value`` is not a unicode string, but a byte string, it is
decoded with the filesystem encoding (as in
:func:`sys.getfilesystemencoding()`).
( R t unicodet decodeR R ( R
( ( s0 /usr/lib/python2.7/site-packages/pyudev/_util.pyt ensure_unicode_string9 s c C` sE t | t r t | } n t | t r1 | St t | Sd S( uΌ
Return a byte string, which represents the given ``value`` in a way
suitable as raw value of an udev property.
If ``value`` is a boolean object, it is converted to ``'1'`` or ``'0'``,
depending on whether ``value`` is ``True`` or ``False``. If ``value`` is a
byte string already, it is returned unchanged. Anything else is simply
converted to a unicode string, and then passed to
:func:`ensure_byte_string`.
N( R t boolt intR R R ( R
( ( s0 /usr/lib/python2.7/site-packages/pyudev/_util.pyt property_value_to_bytesF s
c C` s. | d k r$ t d j | n | d k S( uο
Convert the given unicode string ``value`` to a boolean object.
If ``value`` is ``'1'``, ``True`` is returned. If ``value`` is ``'0'``,
``False`` is returned. Any other value raises a
:exc:`~exceptions.ValueError`.
u 1u 0u Not a boolean value: {0!r}( u 1u 0( t
ValueErrort format( R
( ( s0 /usr/lib/python2.7/site-packages/pyudev/_util.pyt string_to_bool[ s c c` sI xB | rD | j | } | j | } | | f V| j | } q Wd S( uψ
Iteration helper for udev list entry objects.
Yield a tuple ``(name, value)``. ``name`` and ``value`` are bytestrings
containing the name and the value of the list entry. The exact contents
depend on the list iterated over.
N( t udev_list_entry_get_namet udev_list_entry_get_valuet udev_list_entry_get_next( t libudevt entryt nameR
( ( s0 /usr/lib/python2.7/site-packages/pyudev/_util.pyt udev_list_iterateh s
c C` sK t j | j } t | r" d St | r2 d St d j | d S( uΝ
Get the device type of a device file.
``filename`` is a string containing the path of a device file.
Return ``'char'`` if ``filename`` is a character device, or ``'block'`` if
``filename`` is a block device. Raise :exc:`~exceptions.ValueError` if
``filename`` is no device file at all. Raise
:exc:`~exceptions.EnvironmentError` if ``filename`` does not exist or if
its metadata was inaccessible.
.. versionadded:: 0.15
u charu blocku not a device file: {0!r}N( t ost statt st_modet _is_char_devicet _is_block_deviceR R ( t filenamet mode( ( s0 /usr/lib/python2.7/site-packages/pyudev/_util.pyt get_device_type| s c O` s d d l } x t r y | | | SWq t t | j f k
r } t | t t f re | j } n
| j d } | t j k r q n q Xq Wd S( u=
Handle interruptions to an interruptible system call.
Run an interruptible system call in a loop and retry if it raises EINTR.
The signal calls that may raise EINTR prior to Python 3.5 are listed in
PEP 0475. Any calls to these functions must be wrapped in eintr_retry_call
in order to handle EINTR returns in older versions of Python.
This function is safe to use under Python 3.5 and newer since the wrapped
function will simply return without raising EINTR.
This function is based on _eintr_retry_call in python's subprocess.py.
i N( t selectt Truet OSErrort IOErrort errorR t errnot argst EINTR( t funcR* t kwargsR$ t et
error_code( ( s0 /usr/lib/python2.7/site-packages/pyudev/_util.pyt eintr_retry_call s
( t __doc__t
__future__R R R R R R R R) t version_infot pyudev._py2utilt pyudev._py3utilR R R R R t S_ISCHRR t S_ISBLKR R# R0 ( ( ( s0 /usr/lib/python2.7/site-packages/pyudev/_util.pyt s" "