HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/serial/urlhandler/__pycache__/protocol_alt.cpython-38.pyc
U

��WW��@s\zddlZWn ek
r,ddlmZYnXddlZdd�ZedkrXe�d�Ze	e�dS)�Nc
Cs�t�|�}|jdkr&t�d�|j���d}z@t�|jd���D](\}}|dkrX|d}q>t	d�|���q>Wn2t	k
r�}zt�d�|���W5d	}~XYnXt
t|�s�t	d
�|���tt|�}t|tj
�s�t	d�|���d�|j|jg�|fS)
z(extract host and port from an URL stringZaltzmexpected a string in the form "alt://port[?option[=value][&option[=value]]]": not starting with alt:// ({!r})�SerialT�classrzunknown option: {!r}zRexpected a string in the form "alt://port[?option[=value][&option[=value]]]": {!r}Nzunknown class: {!r}z'class {!r} is not an instance of Serial�)�urlparseZurlsplitZscheme�serialZSerialException�formatZparse_qsZquery�items�
ValueError�hasattr�getattr�
issubclassr�joinZnetloc�path)Zurl�parts�
class_nameZoption�values�e�cls�r�@/usr/lib/python3/dist-packages/serial/urlhandler/protocol_alt.py�serial_class_for_urls2

��
��

r�__main__z&alt:///dev/ttyS0?class=PosixPollSerial)
r�ImportErrorZurllib.parse�parserr�__name__Zserial_for_url�s�printrrrr�<module>s