/usr/lib64/python3.9/importlib/__pycache__
NameSizeModeActions
abc.cpython-39.opt-1.pyc168170644editdlrm
abc.cpython-39.opt-2.pyc92540644editdlrm
abc.cpython-39.pyc168170644editdlrm
machinery.cpython-39.opt-1.pyc9640644editdlrm
machinery.cpython-39.opt-2.pyc8240644editdlrm
machinery.cpython-39.pyc9640644editdlrm
metadata.cpython-39.opt-1.pyc221740644editdlrm
metadata.cpython-39.opt-2.pyc160460644editdlrm
metadata.cpython-39.pyc221740644editdlrm
resources.cpython-39.opt-1.pyc63910644editdlrm
resources.cpython-39.opt-2.pyc49690644editdlrm
resources.cpython-39.pyc63910644editdlrm
util.cpython-39.opt-1.pyc93220644editdlrm
util.cpython-39.opt-2.pyc64530644editdlrm
util.cpython-39.pyc93220644editdlrm
_bootstrap.cpython-39.opt-1.pyc289520644editdlrm
_bootstrap.cpython-39.opt-2.pyc221930644editdlrm
_bootstrap.cpython-39.pyc289680644editdlrm
_bootstrap_external.cpython-39.opt-1.pyc458320644editdlrm
_bootstrap_external.cpython-39.opt-2.pyc345520644editdlrm
_bootstrap_external.cpython-39.pyc462440644editdlrm
_common.cpython-39.opt-1.pyc16990644editdlrm
_common.cpython-39.opt-2.pyc14600644editdlrm
_common.cpython-39.pyc16990644editdlrm
__init__.cpython-39.opt-1.pyc38330644editdlrm
__init__.cpython-39.opt-2.pyc31540644editdlrm
__init__.cpython-39.pyc38330644editdlrm
Edit: /usr/lib64/python3.9/importlib/__pycache__/resources.cpython-39.opt-1.pyc (6391B)
a ´i)ã@sÈddlZddlmZddlmZddlmZddlmZmZddl m Z ddl m Z dd l mZmZdd lmZdd lmZdd lmZmZmZmZdd lmZddlmZmZgd¢ZeeefZeeej fZ!edœdd„Z"edœdd„Z#edœdd„Z$eeej%dœdd„Z&dd„Z'ee!edœdd„Z(d4ee!eeed!œd"d#„Z)ee!e*dœd$d%„Z+d5ee!eeed!œd&d'„Z,eej-dœd(d)„Z.ee!d*dœd+d,„Z/ed-d.„ƒZ0eee1d/œd0d1„Z2eeedœd2d3„Z3dS)6éNé)Úabc)Ú_common)Úas_file)ÚcontextmanagerÚsuppress)Ú import_module)ÚResourceLoader)ÚBytesIOÚ TextIOWrapper)ÚPath)Ú ModuleType)ÚContextManagerÚIterableÚOptionalÚUnion)Úcast)ÚBinaryIOÚTextIO) ÚPackageÚResourcerÚcontentsÚfilesÚ is_resourceÚ open_binaryÚ open_textÚpathÚ read_binaryÚ read_text)ÚreturncCst|dƒr|St|ƒS)z)If name is a string, resolve to a module.Ú__spec__)Úhasattrr©Úname©r$ú+/usr/lib64/python3.9/importlib/resources.pyÚ_resolve$s r&cCs&t|ƒ}|jjdur"td |¡ƒ‚|S)z±Take a package name or module object and return the module. If a name, the module is imported. If the resolved module object is not a package, raise an exception. Nz{!r} is not a package)r&r Úsubmodule_search_locationsÚ TypeErrorÚformat)ÚpackageÚmoduler$r$r%Ú _get_package+s r,cCs&tj |¡\}}|r"td |¡ƒ‚|S)z€Normalize a path by ensuring it is a string. If the resulting string contains path separators, an exception is raised. z{!r} must be only a file name)ÚosrÚsplitÚ ValueErrorr))rÚparentÚ file_namer$r$r%Ú_normalize_path7sr2)r*rcCs,|j}t|jdƒr(ttj|j |j¡ƒSdS)NÚget_resource_reader)r r!ÚloaderrÚ resources_abcÚResourceReaderr3r#)r*Úspecr$r$r%Ú_get_resource_readerBs   ÿr8cCs&|jjdus|jjs"td|›�ƒ‚dS)NzPackage has no location )r ÚoriginÚ has_locationÚFileNotFoundError©r*r$r$r%Ú_check_locationPsr=)r*Úresourcerc Csüt|ƒ}t|ƒ}t|ƒ}|dur*| |¡Stj |jjp:d¡}tj  |¡}tj  ||¡}zt |dd�WSt yöt t|jjƒ}d}t|jjdƒrÆtt ƒ�| |¡}Wdƒn1s¼0Y|durê|jj}d ||¡} t| ƒ‚t|ƒYS0dS)zDReturn a file-like object opened for binary reading of the resource.Nznon-existent fileÚrb)ÚmodeÚget_dataz{!r} resource not found in {!r})r2r,r8Ú open_resourcer-rÚabspathr r9ÚdirnameÚjoinÚopenÚOSErrorrr r4r!rrAr#r)r;r ) r*r>ÚreaderZabsolute_package_pathÚ package_pathÚ full_pathr4ÚdataZ package_nameÚmessager$r$r%rUs2  ÿ   (ÿrúutf-8Ústrict)r*r>ÚencodingÚerrorsrcCstt||ƒ||d�S)zBReturn a file-like object opened for text reading of the resource.)rOrP)r r)r*r>rOrPr$r$r%rss ÿrcCs6t||ƒ�}| ¡WdƒS1s(0YdS)z+Return the binary contents of the resource.N)rÚread)r*r>Úfpr$r$r%r|s rcCs:t||||ƒ�}| ¡WdƒS1s,0YdS)z‹Return the decoded string of the resource. The decoding-related arguments have the same semantics as those of bytes.decode(). N)rrQ)r*r>rOrPrRr$r$r%r‚s rcCst t|ƒ¡S)z3 Get a Traversable resource from a package )rÚ from_packager,r<r$r$r%r�srzContextManager[Path]cCs2tt|ƒƒ}|rt||ƒSt t|ƒ t|ƒ¡¡S)akA context manager providing a file path object to the resource. If the resource does not already exist on its own on the file system, a temporary file will be created. If the file was created, the file will be deleted upon exiting the context manager (no exception is raised if the file was deleted prior to the context manager exiting). )r8r,Ú_path_from_readerrrrÚjoinpathr2)r*r>rHr$r$r%r–s ÿ ýrccs†t|ƒ}ttƒ�"t| |¡ƒVWdƒdS1s80Y| |¡}tj|j|d��}|VWdƒn1sx0YdS)N)Úsuffix) r2rr;r Ú resource_pathrBrZ _tempfilerQ)rHr>Z norm_resourceZ opener_readerÚresr$r$r%rT©s   rT)r*r#rcCsTt|ƒ}t|ƒt|ƒ}|dur*| |¡Stt|ƒƒ}||vrBdSt |¡| ¡S)zYTrue if 'name' is a resource inside 'package'. Directories are *not* resources. NF) r,r2r8rÚsetrrrSÚis_file)r*r#rHZpackage_contentsr$r$r%r´s  rcCsdt|ƒ}t|ƒ}|dur | ¡S|jjdup6|jjdk}|sD|jjsHdStdd„t |¡  ¡DƒƒS)zõReturn an iterable of entries in 'package'. Note that not all entries are resources. Specifically, directories are not considered resources. Use `is_resource()` on each entry returned here to check if it is a resource or not. NÚ namespacer$css|] }|jVqdS)Nr")Ú.0Úitemr$r$r%Ú ×ózcontents..) r,r8rr r9r:ÚlistrrSÚiterdir)r*rHr[r$r$r%rÄs  þ r)rMrN)rMrN)4r-Úrr5rrÚ contextlibrrÚ importlibrÚ importlib.abcr Úior r Úpathlibr Útypesr ÚtypingrrrrrZ typing.iorrÚ__all__ÚstrrÚPathLikerr&r,r2r6r8r=rrÚbytesrrÚ TraversablerrrTÚboolrrr$r$r$r%ÚsZ           ÿ  ýý ýý þ