1 # ˆl–Ãa¾”jhŠ€zà¸ÛêbÑ¿Æ ƒsÅ¿Ã& a YºsYd ã@s²ddlZddlZddlTdZeZejdkr8ddlmZnhddlZej dkrXddl mZnHej dkrxddl mZm Z m Z n(ej d kr�ddlmZned  ej ¡ƒ‚d gZd d „ZdS)éN)Ú*z3.4Zcli)ÚSerialÚntÚposix)rÚPosixPollSerialÚ VTIMESerialÚjavaz;Sorry: no implementation for your platform ('{}') availablezserial.urlhandlerc Osî| dd¡ }t}z | ¡}Wnty0Yn’0d|vrÂ| dd¡d}d |¡}tD]Z}zt |¡t ||¡} Wnt yŒYqXYqX0t | dƒr¨|   |¡\}}n| j}qÂqXt d |¡ƒ‚|d g|¢Ri|¤Ž} || _ |rê|  ¡| S) a‰ Get an instance of the Serial class, depending on port/url. The port is not opened when the keyword parameter 'do_not_open' is true, by default it is. All other parameters are directly passed to the __init__ method when the port is instantiated. The list of package names that is searched for protocol handlers is kept in ``protocol_handler_packages``. e.g. we want to support a URL ``foobar://``. A module ``my_handlers.protocol_foobar`` is provided by the user. Then ``protocol_handler_packages.append("my_handlers")`` would extend the search path so that ``serial_for_url("foobar://"))`` would work. Z do_not_openFz://érz .protocol_{}Úserial_class_for_urlz$invalid URL, protocol {!r} not knownN)ÚpoprÚlowerÚAttributeErrorÚsplitÚformatÚprotocol_handler_packagesÚ importlibÚ import_moduleÚ ImportErrorÚhasattrr Ú ValueErrorÚportÚopen) ÚurlÚargsÚkwargsZdo_openÚklassZ url_lowercaseZprotocolZ module_nameZ package_nameZhandler_moduleÚinstance©rú3/usr/lib/python3.9/site-packages/serial/__init__.pyÚserial_for_url)s2       r)ÚsysrZserial.serialutilÚ __version__ZVERSIONÚplatformZserial.serialclirÚosÚnameZserial.serialwin32Zserial.serialposixrrZserial.serialjavarrrrrrrrÚ s"    ÿ$ ˆl–ß=¿Jµ5*q@¹pÜjbÑ¿Ç „ � ߯ÀÄ?÷ % Copyright (C) 2001-2021 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or % implied. % % This software is distributed under license and may not be copied, % modified or distributed except as expressly authorized under the terms % of the license contained in the file LICENSE in this distribution. % % Refer to licensing information at http://www.artifex.com or contact % Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato, % CA 94945, U.S.A., +1(415)492-9861, for further information. % % Extending Font resource category with CIDFont-CMap fonts. languagelevel 2 .setlanguagelevel currentglobal //true setglobal % In the comments below, 'CSI' is an abbreviation/acronym for CIDSystemInfo. % We pre-scan resource files to retrieve the CSI from them. % First we define a hidden procset .prs_dict containing % necessary variables and procedures. % Then we redefine the old /Font category using this procset. % We maintain internal caches for the CSI values retrieved from % resource files. This supposes that document doesn't uninstall % resource files. To disable caching, set enable_cache to false. % We assume that names starting with '.prs' do not appear in resource files. % If this causes any problem, this prefix should be systematically changed % in this file. ('prs' is an abbreviation for 'prescan'.) 25 dict begin % Define local variables : /.prs_dict currentdict def % self-reference (constant) /.prs_empty 0 dict readonly def /path_buffer 8192 string def /name_buffer 1024 string def /minus (-) 0 get def % character code constant for '-' /period (.) 0 get def % character code constant for '.' /CMap 10 dict def % CSI cache for CMaps /CIDFont 10 dict def % CSI cache for CIDFonts /enable_cache //true def % set false to disable cache