Current File : //usr/lib/python2.7/site-packages/serial/tools/list_ports.pyo
�
��VNc@s�dZddlZddlZddlZddlZejdkrRddlTn2ejdkrnddlTnedejf��d�Zd�Z	e
d	kr�e	�ndS(
sAThis 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.
i����Ntnt(t*tposixs;Sorry: no implementation for your platform ('%s') availableccsnxgt�D]\\}}}tj||tj�sUtj||�sUtj||�r
|||fVq
q
WdS(s�    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(tcomportstretsearchtI(tregexptporttdescthwid((s;/usr/lib/python2.7/site-packages/serial/tools/list_ports.pytgrep#s<c	Cs�ddl}|jdddd�}|jdddd	d
dtdd
�|jddddd	ddddd�|jddddd	ddddd�|j�\}}d}|rt|�dkr�|jd�nd|dfGHtt|d��}ntt	��}xW|D]O\}}}d|fGH|j
dkr]d|fGHd|fGHn|d7}qW|j
r�|r�d|fGHq�d GHndS(!Ni����tusages%prog [options] [<regexp>]tdescriptions9Miniterm - A simple terminal program for the serial port.s--debugthelps6print debug messages and tracebacks (development mode)tdesttdebugtdefaulttactiont
store_trues-vs	--verboses0show more messages (can be given multiple times)tverboseitcounts-qs--quietssuppress all messageststore_consttconstis"more than one regexp not supportedsFiltered list with regexp: %rs%-20ss    desc: %ss    hwid: %ss%d ports foundsno ports found(toptparsetOptionParsert
add_optiontFalset
parse_argstlenterrortsortedRRR(	RtparsertoptionstargsthitstiteratorRR	R
((s;/usr/lib/python2.7/site-packages/serial/tools/list_ports.pytmain.sJ			t__main__(t__doc__tsystosRtnametserial.tools.list_ports_windowstserial.tools.list_ports_posixtImportErrorRR%t__name__(((s;/usr/lib/python2.7/site-packages/serial/tools/list_ports.pyt<module>s$

		4