Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.137.188.141
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : resources.pyc
�
���cc@sddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
mZmZeje�Zdadefd��YZdefd	��YZd
efd��YZdefd
��YZdefd��YZdefd��YZieed�6ee	j6Zy^yddlZ Wne!k
r�ddl"Z nXeee j#<eee j$<eee j%<[ Wne!e&fk
r�nXd�Z'iZ(d�Z)ej*e+d��Z,d�Z-dS(i����(tunicode_literalsNi(tDistlibException(tcached_propertytget_cache_basetCachet
ResourceCachecBs&eZdd�Zd�Zd�ZRS(cCsG|dkr-tjjt�td��}ntt|�j|�dS(Nuresource-cache(	tNonetostpathtjoinRtstrtsuperRt__init__(tselftbase((s5/usr/lib/python2.7/site-packages/distlib/resources.pyRs!cCstS(u�
        Is the cache stale for the given resource?

        :param resource: The :class:`Resource` being cached.
        :param path: The path of the resource in the cache.
        :return: True if the cache is stale.
        (tTrue(R
tresourceR((s5/usr/lib/python2.7/site-packages/distlib/resources.pytis_stale"s	cCs�|jj|�\}}|dkr-|}n�tjj|j|j|�|�}tjj|�}tjj	|�s�tj
|�ntjj|�s�t}n|j
||�}|r�t|d��}|j|j�WdQXn|S(u�
        Get a resource into the cache,

        :param resource: A :class:`Resource` instance.
        :return: The pathname of the resource in the cache.
        uwbN(tfindertget_cache_infoRRRR	Rt
prefix_to_dirtdirnametisdirtmakedirstexistsRRtopentwritetbytes(R
RtprefixRtresultRtstaletf((s5/usr/lib/python2.7/site-packages/distlib/resources.pytget-s	$	N(t__name__t
__module__RRRR (((s5/usr/lib/python2.7/site-packages/distlib/resources.pyRs	tResourceBasecBseZd�ZRS(cCs||_||_dS(N(Rtname(R
RR$((s5/usr/lib/python2.7/site-packages/distlib/resources.pyRHs	(R!R"R(((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR#GstResourcecBsJeZdZeZd�Zed��Zed��Zed��Z	RS(u�
    A class representing an in-package resource, such as a data file. This is
    not normally instantiated by user code, but rather by a
    :class:`ResourceFinder` which manages the resource.
    cCs|jj|�S(u�
        Get the resource as a stream.

        This is not a property to make it obvious that it returns a new stream
        each time.
        (Rt
get_stream(R
((s5/usr/lib/python2.7/site-packages/distlib/resources.pyt	as_streamUscCs%tdkrt�antj|�S(N(tcacheRRR (R
((s5/usr/lib/python2.7/site-packages/distlib/resources.pyt	file_path^scCs|jj|�S(N(Rt	get_bytes(R
((s5/usr/lib/python2.7/site-packages/distlib/resources.pyRescCs|jj|�S(N(Rtget_size(R
((s5/usr/lib/python2.7/site-packages/distlib/resources.pytsizeis(
R!R"t__doc__tFalsetis_containerR'RR)RR,(((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR%Ms		tResourceContainercBseZeZed��ZRS(cCs|jj|�S(N(Rt
get_resources(R
((s5/usr/lib/python2.7/site-packages/distlib/resources.pyt	resourcesqs(R!R"RR/RR2(((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR0nstResourceFindercBs�eZdZejjd�r'dZndZd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zeejj�Zd�ZRS(u4
    Resource finder for file system resources.
    ujavau.pycu.pyou.classcCsC||_t|dd�|_tjjt|dd��|_dS(Nu
__loader__u__file__u(tmoduletgetattrRtloaderRRRR(R
R4((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR�s	cCstjj|�S(N(RRtrealpath(R
R((s5/usr/lib/python2.7/site-packages/distlib/resources.pyt_adjust_path�scCs_t|t�rd}nd}|j|�}|jd|j�tjj|�}|j|�S(Nt/u/i(	t
isinstanceRtsplittinsertRRRR	R8(R
t
resource_nametseptpartsR((s5/usr/lib/python2.7/site-packages/distlib/resources.pyt
_make_path�s	cCstjj|�S(N(RRR(R
R((s5/usr/lib/python2.7/site-packages/distlib/resources.pyt_find�scCs
d|jfS(N(RR(R
R((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR�scCsd|j|�}|j|�s'd}n9|j|�rHt||�}nt||�}||_|S(N(R@RARt
_is_directoryR0R%R(R
R=RR((s5/usr/lib/python2.7/site-packages/distlib/resources.pytfind�s		cCst|jd�S(Nurb(RR(R
R((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR&�scCs)t|jd��}|j�SWdQXdS(Nurb(RRtread(R
RR((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR*�scCstjj|j�S(N(RRtgetsize(R
R((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR+�scsD�fd�}tgtj|j�D]}||�r%|^q%�S(Ncs|dko|j�j�S(Nu__pycache__(tendswithtskipped_extensions(R(R
(s5/usr/lib/python2.7/site-packages/distlib/resources.pytallowed�s(tsetRtlistdirR(R
RRHR((R
s5/usr/lib/python2.7/site-packages/distlib/resources.pyR1�scCs|j|j�S(N(RBR(R
R((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR/�sccs�|j|�}|dk	r�|g}x�|r�|jd�}|V|jr'|j}xe|jD]W}|sr|}ndj||g�}|j|�}|jr�|j|�q]|Vq]Wq'q'WndS(Niu/(RCRtpopR/R$R2R	tappend(R
R=RttodotrnameR$tnew_nametchild((s5/usr/lib/python2.7/site-packages/distlib/resources.pytiterator�s 						(u.pycu.pyou.class(u.pycu.pyo(R!R"R-tsystplatformt
startswithRGRR8R@RARRCR&R*R+R1R/tstaticmethodRRRRBRQ(((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR3vs"												tZipResourceFindercBs_eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
u6
    Resource finder for resources in .zip files.
    cCstt|�j|�|jj}dt|�|_t|jd�rY|jj|_nt	j
||_t|j�|_dS(Niu_files(
RRVRR6tarchivetlent
prefix_lenthasattrt_filest	zipimportt_zip_directory_cachetsortedtindex(R
R4RW((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR�scCs|S(N((R
R((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR8�scCs�||j}||jkr%t}nr|rN|dtjkrN|tj}ntj|j|�}y|j|j|�}Wntk
r�t	}nX|s�t
jd||jj
�nt
jd||jj
�|S(Ni����u_find failed: %r %ru_find worked: %r %r(RYR[RRR>tbisectR_RTt
IndexErrorR.tloggertdebugR6R(R
RRti((s5/usr/lib/python2.7/site-packages/distlib/resources.pyRA�s
	

cCs-|jj}|jdt|�}||fS(Ni(R6RWRRX(R
RRR((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR�scCs|jj|j�S(N(R6tget_dataR(R
R((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR*�scCstj|j|��S(N(tiotBytesIOR*(R
R((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR&�scCs|j|j}|j|dS(Ni(RRYR[(R
RR((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR+�scCs�|j|j}|r9|dtjkr9|tj7}nt|�}t�}tj|j|�}xn|t|j�kr�|j|j|�s�Pn|j||}|j	|j
tjd�d�|d7}qfW|S(Ni����ii(RRYRR>RXRIR`R_RTtaddR;(R
RRtplenRRdts((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR1s	 cCs�||j}|r6|dtjkr6|tj7}ntj|j|�}y|j|j|�}Wntk
r~t}nX|S(Ni����(RYRR>R`R_RTRaR.(R
RRdR((s5/usr/lib/python2.7/site-packages/distlib/resources.pyRBs


(R!R"R-RR8RARR*R&R+R1RB(((s5/usr/lib/python2.7/site-packages/distlib/resources.pyRV�s								cCs|tt|�<dS(N(t_finder_registryttype(R6tfinder_maker((s5/usr/lib/python2.7/site-packages/distlib/resources.pytregister_finder2scCs�|tkrt|}n�|tjkr5t|�ntj|}t|dd�}|dkrotd��nt|dd�}tjt	|��}|dkr�td|��n||�}|t|<|S(u�
    Return a resource finder for a package.
    :param package: The name of the package.
    :return: A :class:`ResourceFinder` instance for the package.
    u__path__u8You cannot get a finder for a module, only for a packageu
__loader__uUnable to locate finder for %rN(
t
_finder_cacheRRtmodulest
__import__R5RRRkR Rl(tpackageRR4RR6Rm((s5/usr/lib/python2.7/site-packages/distlib/resources.pyR9s



u	__dummy__cCszd}tj|�tjj|�}tjt|��}|rvt}t	j
j|d�|_||_
||�}n|S(u�
    Return a resource finder for a path, which should represent a container.

    :param path: The path.
    :return: A :class:`ResourceFinder` instance for the path.
    uN(Rtpkgutiltget_importerRRtpath_importer_cacheR RkRlt
_dummy_moduleRRR	t__file__t
__loader__(RRR6RR4((s5/usr/lib/python2.7/site-packages/distlib/resources.pytfinder_for_pathUs
	(.t
__future__RR`RftloggingRRsRRttypesR\tRtutilRRRt	getLoggerR!RbRR(RtobjectR#R%R0R3RVRltzipimporterRkt_frozen_importlib_externalt_fitImportErrort_frozen_importlibtSourceFileLoadert
FileFindertSourcelessFileLoadertAttributeErrorRnRoRt
ModuleTypeR
RvRy(((s5/usr/lib/python2.7/site-packages/distlib/resources.pyt<module>sJ,!ZN





		
© 2025 GrazzMean