a  ze@sddlZddlZddlZddlZddlZddlZddZddZejd ddZ ej ejd d Z e ej ejd d ZdS)NcCs t|jS)z= Return a Traversable object for the given package. )fallback_resources__spec__)packagerE/opt/bitninja-python-dojo/embedded/lib/python3.9/importlib/_common.py from_package srcCsNt|jj}z(|jj}||}t|t|dWSt yHYn0|S)N/) pathlibPathoriginparentloaderarchive relative_tozipfilestr Exception)specZpackage_directoryZ archive_pathZrel_pathrrrrs  rccstj|d\}}zJt||t|t|VWzt|WqtyXYq0n$zt|Wnty|Yn00dS)Nsuffix) tempfilemkstemposwritecloser r removeFileNotFoundError)readerrfdZraw_pathrrr _tempfiles   r ccs:t|j|jd}|VWdn1s,0YdS)zu Given a Traversable object, return that object as a path on the local file system in a context manager. rN)r read_bytesname)pathlocalrrras_file-sr%ccs |VdS)z7 Degenerate behavior for pathlib.Path objects. Nr)r#rrr_8sr&)r)rr rr functools contextlibrrcontextmanagerr singledispatchr%registerr r&rrrrs