ok
Direktori : /proc/self/root/proc/self/root/proc/thread-self/root/usr/lib/python2.7/site-packages/ |
Current File : //proc/self/root/proc/self/root/proc/thread-self/root/usr/lib/python2.7/site-packages/hwdata.pyo |
� ��POc @ s0 d Z d d d � � YZ d d d � � YZ d S( sF Query hwdata database and return decription of vendor and/or device. t USBc B s8 e Z d Z d Z d Z d d � Z d � Z d � Z RS( s) Interace to usb.ids from hwdata package s /usr/share/hwdata/usb.idsc C s� | r | | _ n t j | _ d | _ | j r�t j r�i t _ x�t | j � j � D]h} | j � } | j d � r� | j d � rY Pq�qY qY t | � d k r� qY qY | j d � r| d j � } t | � d k r� d j | d � } n d } | t j | d | d | <qY | j d � rh| d j � } d j | d � } | i g t j | d | <qY | d j � } d j | d � } | t j k r�| i g t j | <qY | t j | d <qY Wn d S( s Load pci.ids from file to internal data structure. parameter 'filename' can specify location of this file i t #s8 # List of known device classes, subclasses and protocolsi s i t t s N( t filenameR t cachet devicest opent readlinest splitt startswitht lent lowert join( t selfR t linet lt interface_idt interface_namet vendort devicet device_namet vendor_name( ( s* /usr/lib/python2.7/site-packages/hwdata.pyt __init__ s: c C sA | j � } | j r: | t j k r3 t j | d Sd Sn � d S( s~ Return description of vendor. Parameter is two byte code in hexa. If vendor is unknown None is returned. i N( R R R R t None( R R ( ( s* /usr/lib/python2.7/site-packages/hwdata.pyt get_vendor@ s c C ss | j � } | j � } | j rl | t j k re | t j | d k r^ t j | d | d Sd Sqo d Sn � d S( s� Return description of device. Parameters are two byte code variables in hexa. If device is unknown None is returned. i i N( R R R R R ( R R R ( ( s* /usr/lib/python2.7/site-packages/hwdata.pyt get_deviceM s N( t __name__t __module__t __doc__R R R R R R ( ( ( s* /usr/lib/python2.7/site-packages/hwdata.pyR s ) t PCIc B s8 e Z d Z d Z d Z d d � Z d � Z d � Z RS( s) Interace to pci.ids from hwdata package s /usr/share/hwdata/pci.idsc C sm | r | | _ n t j | _ d | _ | j rit j rii } i t _ xt | j � j � D]} | j � } | j d � r� q_ q_ t | � d k r� q_ q_ | j d � r� q_ q_ | j d � r� | d j � } d j | d � } | t j | d | <q_ | d j � } d j | d � } | t t j j � � k rQ| i g t j | <q_ | t j | d <q_ Wn d S( s Load pci.ids from file to internal data structure. parameter 'filename' can specify location of this file i R i s s R N( R R R R R R R R R R R t listt keys( R R t pcirecR R R R R R ( ( s* /usr/lib/python2.7/site-packages/hwdata.pyR c s0 c C sM | j � } | j rF | t t j j � � k r? t j | d Sd Sn � d S( s~ Return description of vendor. Parameter is two byte code in hexa. If vendor is unknown None is returned. i N( R R R R R R R ( R R ( ( s* /usr/lib/python2.7/site-packages/hwdata.pyR � s c C s� | j � } | j � } | j r� | t t j j � � k ry | t t j | d j � � k rr t j | d | Sd Sq� d Sn � d S( s� Return description of device. Parameters are two byte code variables in hexa. If device is unknown None is returned. i N( R R R R R R R ( R R R ( ( s* /usr/lib/python2.7/site-packages/hwdata.pyR � s #N( R R R R R R R R R ( ( ( s* /usr/lib/python2.7/site-packages/hwdata.pyR ^ s " N( ( ( R R R ( ( ( s* /usr/lib/python2.7/site-packages/hwdata.pyt <module> s L