Current Dir: /snap/core22/2955/usr/lib/python3/dist-packages/serial/tools/__pycache__/
[FILE] hexlify_codec.cpython-310.pyc [ edit | delete | rename ]
[FILE] list_ports.cpython-310.pyc [ edit | delete | rename ]
[FILE] list_ports_common.cpython-310.pyc [ edit | delete | rename ]
[FILE] list_ports_linux.cpython-310.pyc [ edit | delete | rename ]
[FILE] list_ports_osx.cpython-310.pyc [ edit | delete | rename ]
[FILE] list_ports_posix.cpython-310.pyc [ edit | delete | rename ]
[FILE] list_ports_windows.cpython-310.pyc [ edit | delete | rename ]
[FILE] miniterm.cpython-310.pyc [ edit | delete | rename ]
[FILE] __init__.cpython-310.pyc [ edit | delete | rename ]
Viewing: /snap/core22/2955/usr/lib/python3/dist-packages/serial/tools/__pycache__/list_ports.cpython-310.pyc
o
��^=
� @ s� d Z ddlmZ ddlZddlZddlZejdkr ddlmZ nejdkr,ddl mZ ne
d�ej���dd d
�Zdd� Z
ed
krFe
� dS dS )aA This module will provide a function called comports that returns an
iterable (generator or list) that will enumerate available com ports. Note that
on some systems non-existent ports may be listed.
Additionally a grep function is supplied that can be used to search for ports
based on their descriptions or hardware ID.
� )�absolute_importN�nt)�comports�posixz;Sorry: no implementation for your platform ('{}') availableFc c sP � t �| t j�}t|�D ]}|\}}}|�|�s"|�|�s"|�|�r%|V qdS )z� Search for ports using a regular expression. Port name, description and
hardware ID are searched. The function returns an iterable that returns the
same tuples as comport() would do.
N)�re�compile�Ir �search)�regexp�
include_links�r�info�port�desc�hwid� r �9/usr/lib/python3/dist-packages/serial/tools/list_ports.py�grep'