Server IP : 192.158.238.246 / Your IP : 3.15.22.62 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3.6/site-packages/serial/urlhandler/__pycache__/ |
Upload File : |
3 M�]W/ � @ sf d dl Z d dlZ ye 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,|jd�r,tjjj| | j|�� ntjjj| |� dS )z%translate port name before storing itz hwgrep://N)� isinstance� basestring� startswith�serialr �port�__set__�from_url)�self�value� r �%/usr/lib/python3.6/protocol_hwgrep.pyr $ s zSerial.portc C s, |j � jd�r|dd� }d}d}|jd�}|jd�}xv|D ]n}d|krZ|jdd�\}}n|}d}|d kr�t|�d }|dk r�td j|���q<|dkr�d}q<td j|���q<W xxttj j j|��D ]R\} } }|�rytj| �}W n tj k r� w�Y n X |j� |�r|d8 }q�| S W tj dj|���dS )z(extract host and port from an URL stringz hwgrep://� 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<