| Server IP : 46.101.140.223 / Your IP : 216.73.217.61 Web Server : nginx/1.22.1 System : Linux debian-s-1vcpu-1gb-fra1-01 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : deploy-others ( 1001) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/serial/urlhandler/__pycache__/ |
Upload File : |
�
��^� � � � d dl mZ d dlZn# e$ r d dlmZ Y nw xY wd dlZd� Zedk r ej d� � Z
ee
� � dS dS )� )�absolute_importNc �, � t j | � � }|j dk r,t j d� |j � � � � �d} t j |j d� � � � � D ]5\ }}|dk r |d }�t d� |� � � � �n9# t $ r,}t j d� |� � � � �d }~ww xY wt t |� � s"t d
� |� � � � �t t |� � }t |t j
� � s"t d� |� � � � �d� |j |j g� � |fS )
z(extract host and port from an URL string�altzmexpected a string in the form "alt://port[?option[=value][&option[=value]]]": not starting with alt:// ({!r})�SerialT�classr zunknown 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� )�urlparse�urlsplit�scheme�serial�SerialException�format�parse_qs�query�items�
ValueError�hasattr�getattr�
issubclassr �join�netloc�path)�url�parts�
class_name�option�values�e�clss �@/usr/lib/python3/dist-packages/serial/urlhandler/protocol_alt.py�serial_class_for_urlr! s� � ���c�"�"�E��|�u����$�
.�.4�f�U�\�.B�.B�D� D� D� �J� N�&�/���T�B�B�H�H�J�J� H� H�N�F�F��� � �#�A�Y�
�
� �!7�!>�!>�v�!F�!F�G�G�G� H��
� N� N� N��$�
C�CI�6�!�9�9�N� N� N�����N���� �6�:�&�&� C��.�5�5�j�A�A�B�B�B�
�&�*�
%�
%�C��c�6�=�)�)� W��B�I�I�*�U�U�V�V�V��G�G�U�\�5�:�.�/�/��5�5s �A"B2 �2
C(�<'C#�#C(�__main__z&alt:///dev/ttyS0?class=PosixPollSerial)�
__future__r r �ImportError�urllib.parse�parser r! �__name__�serial_for_url�s�print� � r �<module>r- s� ��&