
    ^                        d Z ddlmZ ddlZddlZddlZddlmZ ej                  j                         Z
e
dd dk(  rddlmZ ne
dd d	k(  rddlmZ ne
d
k(  rd#dZne
dd dk(  rd#dZne
dd dk(  se
dd dk(  rd#dZne
dd dk(  rd#dZne
dd dk(  rd#dZne
dd dk(  rd#dZne
dd dk(  rd#dZn|e
dd dk(  rd#dZnoddlZej                  j!                  dj#                  ej                  ej$                  ej&                                ed j#                  ej$                              ed!k(  r0 e e             D ]  \  ZZZ ed"j#                  eee             ! yy)$a  The ``comports`` function is expected to return an iterable that yields tuples
of 3 strings: port name, human readable description and a hardware ID.

As currently no method is known to get the second two strings easily, they are
currently just identical to the port name.
    )absolute_importN)list_ports_common   linux)comports   darwincygwinc                     t        j                   d      }| r$|j                  t        j                  |             |D cg c]  }t        j                  |       c}S c c}w )Nz
/dev/ttyS*globextendr   
list_linksListPortInfoinclude_linksdevicesds      ?/usr/lib/python3/dist-packages/serial/tools/list_ports_posix.pyr   r   '   sK    ))L)NN,77@A;BCa!..q1CCC    A   openbsdc                     t        j                   d      }| r$|j                  t        j                  |             |D cg c]  }t        j                  |       c}S c c}w )Nz	/dev/cua*r   r   s      r   r   r   .   sK    ))K(NN,77@A;BCa!..q1CCCr      bsdfreebsdc                     t        j                   d      }| r$|j                  t        j                  |             |D cg c]  }t        j                  |       c}S c c}w )Nz/dev/cua*[!.init][!.lock]r   r   s      r   r   r   5   sL    ))78NN,77@A;BCa!..q1CCCr   netbsdc                     t        j                   d      }| r$|j                  t        j                  |             |D cg c]  }t        j                  |       c}S c c}w )8scan for available ports. return a list of device names.z	/dev/dty*r   r   s      r   r   r   <   K    ))K(NN,77@A;BCa!..q1CCCr      irixc                     t        j                   d      }| r$|j                  t        j                  |             |D cg c]  }t        j                  |       c}S c c}w )r    z
/dev/ttyf*r   r   s      r   r   r   D   K    ))L)NN,77@A;BCa!..q1CCCr      hpc                     t        j                   d      }| r$|j                  t        j                  |             |D cg c]  }t        j                  |       c}S c c}w )r    z/dev/tty*p0r   r   s      r   r   r   L   sK    ))M*NN,77@A;BCa!..q1CCCr   sunosc                     t        j                   d      }| r$|j                  t        j                  |             |D cg c]  }t        j                  |       c}S c c}w )r    z
/dev/tty*cr   r   s      r   r   r   T   r%   r   aixc                     t        j                   d      }| r$|j                  t        j                  |             |D cg c]  }t        j                  |       c}S c c}w )r    z	/dev/tty*r   r   s      r   r   r   \   r!   r   a4  don't know how to enumerate ttys on this system.
! I you know how the serial ports are named send this information to
! the author of this module:

sys.platform = {!r}
os.name = {!r}
pySerial version = {}

also add the naming scheme of the serial ports and with a bit luck you can get
this module running...
z;Sorry: no implementation for your platform ('{}') available__main__z{}: {} [{}])F)__doc__
__future__r   r   sysosserial.toolsr   platformlowerplatserial.tools.list_ports_linuxr   serial.tools.list_ports_osxserialstderrwriteformatnameVERSIONImportError__name__sortedportdeschwidprint     r   <module>rG      s   '  
 	 * ||8w6	"1X4	XD 
"1XD 
"1X$r(i/D 
"1XD 
"1XD 
"1XD 
"1XD 
"1XD JJ  F3<<&..13 SZZ[][b[bc
dd z"8:. 6dDm""4t456 rF   