+
    ^                         ^ RI Ht ^ RIt^ RIt^ RIt^ RItR t ! R R]4      tR t	]
R8X  d   ]! ]! R4      4       R# R# )	    )absolute_importNc                    . p\         P                  ! RV 4       F*  pV'       g   K   \        V4      pVP	                  V4       K,  	  V#   \         d     L$i ; i)zWConvert string into a list of texts and numbers in order to support a
natural sorting.
z(\d+))resplitint
ValueErrorappend)textresultgroups   &  @/usr/lib/python3/dist-packages/serial/tools/list_ports_common.pynumsplitr      sZ    
 F(D)5E
 MM%  * M  s   A

AAc                   ^   a  ] tR t^#t o RtRR ltR tR tR tR t	R t
R tR	 tR
 tRtV tR# )ListPortInfoz+Info collection base class for serial portsc                   Wn         \        P                  P                  V4      V n        R V n        R V n        RV n        RV n        RV n	        RV n
        RV n        RV n        RV n        V'       gc   Ve]   \        P                  P                  V4      '       d6   RP                  \        P                  P!                  V4      4      V n        R# R# R# R# )zn/aNzLINK={})deviceospathbasenamenamedescriptionhwidvidpidserial_numberlocationmanufacturerproduct	interfaceislinkformatrealpath)selfr   skip_link_detections   &&&r   __init__ListPortInfo.__init__&   s    GG$$V,	 	! "v'9bggnnV>T>T!(()9)9&)ABDI ?U'9"    c                    V P                   e'   RP                  V P                  V P                   4      # V P                  e   V P                  # V P                  # )z8return a short string to name the port based on USB info{} - {})r   r!   r   r   r#   s   &r   usb_descriptionListPortInfo.usb_description7   sE    >>%##DLL$..AA\\%<<99r'   c                &   RP                  V P                  ;'       g    ^ V P                  ;'       g    ^ V P                  e   RP                  V P                  4      MRV P                  e    RP                  V P                  4      4      # R4      # )z9return a string with USB related information about devicezUSB VID:PID={:04X}:{:04X}{}{}z SER={} z LOCATION={})r!   r   r   r   r   r*   s   &r   usb_infoListPortInfo.usb_info@   s    .55HHMMHHMM484F4F4RIT//0XZ48MM4MN!!$--0	W 	W TV	W 	Wr'   c                Z    V P                  4       V n        V P                  4       V n        R# )z)update description and hwid from USB dataN)r+   r   r/   r   r*   s   &r   apply_usb_infoListPortInfo.apply_usb_infoH   s     //1MMO	r'   c                d    \        V\        4      ;'       d    V P                  VP                  8H  # N)
isinstancer   r   r#   others   &&r   __eq__ListPortInfo.__eq__M   s$    %.NN4;;%,,3NNr'   c                ,    \        V P                  4      # r5   )hashr   r*   s   &r   __hash__ListPortInfo.__hash__P   s    DKK  r'   c                   \        V\        4      '       gB   \        R P                  \	        V 4      P
                  \	        V4      P
                  4      4      h\        V P                  4      \        VP                  4      8  # )z unorderable types: {}() and {}())r6   r   	TypeErrorr!   type__name__r   r   r7   s   &&r   __lt__ListPortInfo.__lt__S   sc    %..>EET
##U$$& ' ' $x'===r'   c                N    R P                  V P                  V P                  4      # )r)   )r!   r   r   r*   s   &r   __str__ListPortInfo.__str__Z   s    T-=-=>>r'   c                    V^ 8X  d   V P                   # V^8X  d   V P                  # V^8X  d   V P                  # \        RP	                  V4      4      h)z7Item access: backwards compatible -> (port, desc, hwid)z{} > 2)r   r   r   
IndexErrorr!   )r#   indexs   &&r   __getitem__ListPortInfo.__getitem__]   sK    A:;;aZ###aZ99X__U344r'   )r   r   r   r   r   r   r   r   r   r   r   N)F)rB   
__module____qualname____firstlineno____doc__r%   r+   r/   r2   r9   r=   rC   rF   rK   __static_attributes____classdictcell__)__classdict__s   @r   r   r   #   s=     5C"W$
O!>?	5 	5r'   r   c                    . p\         P                   ! R4       Fa  p\        P                  P                  V4      '       g   K*  \        P                  P	                  V4      V 9   g   KP  VP                  V4       Kc  	  V# )zXsearch all /dev devices and look for symlinks to known ports already
listed in devices.
z/dev/*)globr   r   r    r"   r	   )deviceslinksr   s   &  r   
list_linksrX   j   sX    
 E))H%77>>&!!bgg&6&6v&>'&ILL  & Lr'   __main__dummy)
__future__r   r   rU   r   os.pathr   objectr   rX   rB   print r'   r   <module>r`      sK    ' 	  	  C56 C5N	 z	,w
  r'   