Current File : //usr/lib/python2.7/site-packages/serial/urlhandler/protocol_hwgrep.pyc
�
q�NNc@s^ddlZddlZdejfd��YZedkrZed�Zde_eGHndS(i����NtSerialcBs;eZdZd�Zd�Zeejjedd�Z	RS(sOJust inherit the native Serial port implementation and patch the open function.cCsTt|t�r=|jd�r=tjj||j|��ntjj||�dS(s%translate port name before storing its	hwgrep://N(t
isinstancet
basestringt
startswithtserialRtsetPorttfromURL(tselftvalue((sE/usr/lib/python2.7/site-packages/serial/urlhandler/protocol_hwgrep.pyRscCsf|j�jd�r"|d}nx=tjjj|�D]\}}}|SWtjd|f��dS(s(extract host and port from an URL strings	hwgrep://i	s!no ports found matching regexp %rN(tlowerRRttoolst
list_portstgreptSerialException(Rturltporttdescthwid((sE/usr/lib/python2.7/site-packages/serial/urlhandler/protocol_hwgrep.pyRs

%tdocsPort setting(
t__name__t
__module__t__doc__RRtpropertyRRtgetPortR(((sE/usr/lib/python2.7/site-packages/serial/urlhandler/protocol_hwgrep.pyRs		
t__main__shwgrep://ttyS0(Rtserial.tools.list_portsRRtNonetsR(((sE/usr/lib/python2.7/site-packages/serial/urlhandler/protocol_hwgrep.pyt<module>s