| Server IP : 172.67.131.151 / Your IP : 162.159.115.10 Web Server : Apache System : Linux keen-cori.18-142-40-148.plesk.page 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 06:59:36 UTC 2025 x86_64 User : simottodesign.com_2tntp341vs7 ( 10011) PHP Version : 8.3.31 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/serial/urlhandler/__pycache__/ |
Upload File : |
U
��WW/ � @ sf d dl Z d dlZ ze W n ek
r0 eZY nX G dd� de j�Zedkrbed�Zde_e e� dS )� Nc @ s* e Zd ZdZejjjdd� �Zdd� ZdS )�SerialzOJust inherit the native Serial port implementation and patch the port property.c C s@ t |t�r,|�d�r,tjj�| | �|�� ntjj�| |� dS )z%translate port name before storing it� hwgrep://N)�
isinstance�
basestring�
startswith�serialr �port�__set__�from_url)�self�value� r
�C/usr/lib/python3/dist-packages/serial/urlhandler/protocol_hwgrep.pyr $ s zSerial.portc
C s( |� � �d�r|dd� }d}d}|�d�}|�d�}|D ]n}d|krX|�dd�\}}n|}d}|d kr�t|�d }|dk r�td
�|���q:|dkr�d}q:td
�|���q:ttj j
�|��D ]V\} }
}|r�zt�| �}W n tj
k
r� Y q�Y n
X |�� |�r|d8 }q�| S t�
d�|���dS )z(extract host and port from an URL stringr � Nr F�&�=� �nz9option "n" expects a positive integer larger than 1: {!r}Z skip_busyTzunknown option: {!r}z#no ports found matching regexp {!r})�lowerr �split�pop�int�
ValueError�format�sortedr ZtoolsZ
list_portsZgrepr ZSerialException�close)
r Zurlr Z test_open�argsZregexp�argZoptionr r ZdescZhwid�sr
r
r r
, s<