HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/lib/python3.6/site-packages/serial/urlhandler/__pycache__/protocol_alt.cpython-36.pyc
3

M�]W��@sZyddlZWnek
r*ddljZYnXddlZdd�ZedkrVejd�Ze	e�dS)�NcCs�tj|�}|jdkr&tjdj|j���d}yDx>tj|jd�j�D](\}}|dkrZ|d}q@t	dj|���q@WWn2t	k
r�}ztjdj|���WYd	d	}~XnXt
t|�s�t	d
j|���tt|�}t|tj
�s�t	dj|���dj|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�)�urlparseZurlsplit�scheme�serialZSerialException�formatZparse_qsZquery�items�
ValueError�hasattr�getattr�
issubclassr�joinZnetloc�path)Zurl�parts�
class_nameZoption�values�e�cls�r�"/usr/lib/python3.6/protocol_alt.py�serial_class_for_urls*





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