
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
3
M]W                 @   s  d 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rRddl	m
Z
 n4edd dkrrddlm
Z
 ned	krd
d Z
n edd dkrdd Z
nedd dksedd dkrdd Z
nedd dkrdd Z
nedd dkrdd Z
nedd dkrdd Z
nledd dkr6dd Z
nPedd dkrRdd Z
n4ddlZejjdjejejej ed jejed!krx,ee
 D ]\ZZZed"jeee qW dS )#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.
    N)list_ports_common   linux)comports   darwincygwinc              C   s   t j d} dd | D S )Nz
/dev/ttyS*c             S   s   g | ]}t j|qS  )r   ListPortInfo).0dr	   r	   &/usr/lib/python3.6/list_ports_posix.py
<listcomp>'   s    zcomports.<locals>.<listcomp>)glob)devicesr	   r	   r   r   %   s    
r      Zopenbsdc              C   s   t j d} dd | D S )Nz	/dev/cua*c             S   s   g | ]}t j|qS r	   )r   r
   )r   r   r	   r	   r   r   ,   s    zcomports.<locals>.<listcomp>)r   )r   r	   r	   r   r   *   s    
   ZbsdZfreebsdc              C   s   t j d} dd | D S )Nz/dev/cua*[!.init][!.lock]c             S   s   g | ]}t j|qS r	   )r   r
   )r   r   r	   r	   r   r   1   s    zcomports.<locals>.<listcomp>)r   )r   r	   r	   r   r   /   s    
Znetbsdc              C   s   t j d} dd | D S )z8scan for available ports. return a list of device names.z	/dev/dty*c             S   s   g | ]}t j|qS r	   )r   r
   )r   r   r	   r	   r   r   7   s    zcomports.<locals>.<listcomp>)r   )r   r	   r	   r   r   4   s    
   irixc              C   s   t j d} dd | D S )z8scan for available ports. return a list of device names.z
/dev/ttyf*c             S   s   g | ]}t j|qS r	   )r   r
   )r   r   r	   r	   r   r   =   s    zcomports.<locals>.<listcomp>)r   )r   r	   r	   r   r   :   s    
   Zhpc              C   s   t j d} dd | D S )z8scan for available ports. return a list of device names.z/dev/tty*p0c             S   s   g | ]}t j|qS r	   )r   r
   )r   r   r	   r	   r   r   C   s    zcomports.<locals>.<listcomp>)r   )r   r	   r	   r   r   @   s    
sunosc              C   s   t j d} dd | D S )z8scan for available ports. return a list of device names.z
/dev/tty*cc             S   s   g | ]}t j|qS r	   )r   r
   )r   r   r	   r	   r   r   I   s    zcomports.<locals>.<listcomp>)r   )r   r	   r	   r   r   F   s    
aixc              C   s   t j d} dd | D S )z8scan for available ports. return a list of device names.z	/dev/tty*c             S   s   g | ]}t j|qS r	   )r   r
   )r   r   r	   r	   r   r   O   s    zcomports.<locals>.<listcomp>)r   )r   r	   r	   r   r   L   s    
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{}: {} [{}])__doc__r   sysosZserial.toolsr   platformlowerZplatZserial.tools.list_ports_linuxr   Zserial.tools.list_ports_osxserialstderrwriteformatnameVERSIONImportError__name__sortedZportZdescZhwidprintr	   r	   r	   r   <module>   s@   

 






