
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!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r†d
d„ Z
�n edd… dkr dd„ Z
næedd… dksÀedd… dkrÊdd„ Z
n¼edd… dkrädd„ Z
n¢edd… dkrþdd„ Z
nˆe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�r¾x,ee
ƒ ƒD ]\ZZZed"jeeeƒƒ �qœW 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@   

 






