a œ™WWÉã@sZz ddlZWney*ddlmZYn0ddlZdd„ZedkrVe d¡Ze eƒdS)éNc Csòt |¡}|jdkr&t d |j¡¡‚d}z@t |jd¡ ¡D](\}}|dkrX|d}q>t d |¡ƒ‚q>Wn4t yž}zt d |¡¡‚WYd }~n d }~00t t|ƒs¸t d  |¡ƒ‚t t|ƒ}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Ú)ÚurlparseÚurlsplitÚschemeÚserialZSerialExceptionÚformatÚparse_qsÚqueryÚitemsÚ ValueErrorÚhasattrÚgetattrÚ issubclassrÚjoinÚnetlocÚpath)ÚurlÚpartsÚ class_nameÚoptionÚvaluesÚeÚcls©rúB/usr/lib/python3.9/site-packages/serial/urlhandler/protocol_alt.pyÚserial_class_for_urls2  ÿÿ ÿÿ   rÚ__main__z&alt:///dev/ttyS0?class=PosixPollSerial) rÚ ImportErrorÚ urllib.parseÚparserrÚ__name__Zserial_for_urlÚsÚprintrrrrÚs