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: 52.15.86.13
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : zipfile.cpython-32.pyo
l
��bc@sdZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
yddlZejZWn!e
k
r�eZe
jZYnXddddddd	d
ddg
ZGd
�de�ZGd�de�ZeZZdd>dZdd>Zdd>dZdZdZdZdZe	je�ZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)e	je(�Z*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2dZ3dZ4dZ5dZ6d Z7d!Z8d"Z9d#Z:dZ;d$Z<d%Z=d&Z>d'Z?e	je>�Z@dZAdZBdZCdZDdZEdZFdZGdZHdZIdZJdZKdZLd(ZMd)ZNe	jeM�ZOd*ZPd+ZQe	jeP�ZRdZSdZTdZUdZVdZWdZXdZYdZZdZ[dZ\d,�Z]d-�Z^d.�Z_d/�Z`Gd0�d	ea�ZbGd1�d2�Zcid3d6d4d6d5d6d5d6d5d6d5d6d6d6d7d6d8d6d9d6d6d6d:d 6d;d"6d<d%6d=d>6d?d@6dAdB6ZdGdC�dDeje�ZfGdE�d
�ZgGdF�deg�ZhedG�ZiejdHkrei�ndS(IuP
Read and write ZIP files.

XXX references to utf-8 need further investigation.
iNu
BadZipFileu
BadZipfileuerroru
ZIP_STOREDuZIP_DEFLATEDu
is_zipfileuZipInfouZipFileu	PyZipFileuLargeZipFilecBs|EeZdS(N(u__name__u
__module__(u
__locals__((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu
BadZipFiles
cBs|EeZdZdS(uu
    Raised when writing a zipfile, the zipfile requires ZIP64 extensions
    and those extensions are disabled.
    N(u__name__u
__module__u__doc__(u
__locals__((u./usr/local/python-3.2/lib/python3.2/zipfile.pyuLargeZipFile s
iiiis<4s4H2LHsPKiiiiiii	u<4s4B4HL2L5H2LsPKi
iii
iiiiu<4s2B4HL2L2HsPKu<4sLQLsPKu
<4sQ2H2L4QsPKcCs-yt|�rdSWntk
r(YnXdS(NTF(u_EndRecDatauTrueuIOErroruFalse(ufp((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu_check_zipfile�s
cCshd}yIt|d�r*td|�}n$t|d��}t|�}WdQXWntk
rcYnX|S(u�Quickly see if a file is a ZIP file by checking the magic number.

    The filename argument may be a file or file-like object too.
    ureadufpurbNF(uFalseuhasattru_check_zipfileuopenuIOError(ufilenameuresultufp((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu
is_zipfile�s
cCsry|j|td�Wntk
r0|SYnX|jt�}t|�tkrV|Stjt|�\}}}}|tkr�|S|dks�|dkr�t	d��n|j|tt
d�|jt
�}t|�t
kr�|Stjt|�\
}}}	}
}}}
}}}|tkr(|S||t
<||t<||t<|
|t<||t<||t<||t<|S(uM
    Read the ZIP64 end-of-archive records and use that to update endrec
    iiiu3zipfiles that span multiple disks are not supported(useekusizeEndCentDir64LocatoruIOErrorureadulenustructuunpackustructEndArchive64LocatorustringEndArchive64Locatoru
BadZipFileusizeEndCentDir64ustructEndArchive64ustringEndArchive64u_ECD_SIGNATUREu_ECD_DISK_NUMBERu_ECD_DISK_STARTu_ECD_ENTRIES_THIS_DISKu_ECD_ENTRIES_TOTALu	_ECD_SIZEu_ECD_OFFSET(ufpinuoffsetuendrecudatausigudisknoureloffudisksuszucreate_versionuread_versionudisk_numudisk_dirudircountu	dircount2udirsizeu	diroffset((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu
_EndRecData64�s6
	0






c	Cs�|jdd�|j�}y|jtd�Wntk
rIdSYnX|j�}t|�tkr�|dd�tkr�|d	d�dkr�tj	t
|�}t|�}|jd�|j|t�t
|t|�St|d
td�}|j|d�|j�}|jt�}|dkr�|||t�}t|�tkrYdSttj	t
|��}|t}||t|t|�}|j|�|j||�t
|||||�SdS(u�Return data from the "End of Central Directory" record, or None.

    The data is a list of the nine items in the ZIP "End of central dir"
    record followed by a tenth item, the file seek offset of this record.iiiNssiii����i(useekutellusizeEndCentDiruIOErroruNoneureadulenustringEndArchiveustructuunpackustructEndArchiveulistuappendu
_EndRecData64umaxurfindu_ECD_COMMENT_SIZE(	ufpinufilesizeudatauendrecumaxCommentStartustarturecDataucommentSizeucomment((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu_EndRecData�s>
	


cBsG|EeZdZdZddd�Zdd�Zd�Zd�ZdS(u>Class with attributes describing each file in the ZIP archive.u
orig_filenameufilenameu	date_timeu
compress_typeucommentuextrau
create_systemucreate_versionuextract_versionureservedu	flag_bitsuvolumeu
internal_attru
external_attru
header_offsetuCRCu
compress_sizeu	file_sizeu	_raw_timeuNoNamei�iicCs&||_|jtd��}|dkr=|d|�}ntjdkrstj|krs|jtjd�}n||_||_|ddkr�td��nt	|_
d|_d|_t
jdkr�d|_n	d|_d|_d|_d|_d|_d|_d|_d|_dS(	Niu/i�u+ZIP does not support timestamps before 1980suwin32ii(u
orig_filenameufinduchruosusepureplaceufilenameu	date_timeu
ValueErroru
ZIP_STOREDu
compress_typeucommentuextrausysuplatformu
create_systemucreate_versionuextract_versionureservedu	flag_bitsuvolumeu
internal_attru
external_attr(uselfufilenameu	date_timeu	null_byte((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu__init__(s.													c
Cs�|j}|ddd>|dd>B|dB}|dd>|d	d>B|ddB}|jd
@rsd}}}n|j}|j}|j}|j}|dkr�|tkp�|tk}n|r�d}	|tj	|	dtj
|	�d	||�}n|tks|tkr_|s&td��nd
}d
}td|j
�|_
td|j
�|_n|j�\}
}tj	tt|j
|j||j|||||t|
�t|��
}||
|S(u'Return the per-file header as a string.ii�i	iiiiiiiu<HHQQu'Filesize would require ZIP64 extensionsI����i-N(u	date_timeu	flag_bitsuCRCu
compress_sizeu	file_sizeuextrauNoneuZIP64_LIMITustructupackucalcsizeuLargeZipFileumaxuextract_versionucreate_versionu_encodeFilenameFlagsustructFileHeaderustringFileHeaderureservedu
compress_typeulen(
uselfuzip64udtudosdateudostimeuCRCu
compress_sizeu	file_sizeuextraufmtufilenameu	flag_bitsuheader((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu
FileHeaderRs:	&&
				#cCsSy|jjd�|jfSWn/tk
rN|jjd�|jdBfSYnXdS(Nuasciiuutf-8i(ufilenameuencodeu	flag_bitsuUnicodeEncodeError(uself((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu_encodeFilenameFlagsys
cCs�|j}tj}xv|r�|d|dd��\}}|dkrs|dkrn|d|dd��}nx|dkr�|d|dd	��}nP|d
kr�|d|dd��}n(|d
kr�d}ntd|f��d
}|jdkr|||_|d7}n|jdkr>|||_|d7}n|jdkrs|j}|||_|d7}qsn||dd�}qWdS(Nu<HHiiiu<QQQiiu<QQiiu<QiiuCorrupt extra field %sl����I����((l����I����(uextraustructuunpackuRuntimeErroru	file_sizeu
compress_sizeu
header_offset(uselfuextrauunpackutpulnucountsuidxuold((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu_decodeExtras4				



	
N(u
orig_filenameufilenameu	date_timeu
compress_typeucommentuextrau
create_systemucreate_versionuextract_versionureservedu	flag_bitsuvolumeu
internal_attru
external_attru
header_offsetuCRCu
compress_sizeu	file_sizeu	_raw_time(i�iiiii(	u__name__u
__module__u__doc__u	__slots__u__init__uNoneu
FileHeaderu_encodeFilenameFlagsu_decodeExtra(u
__locals__((u./usr/local/python-3.2/lib/python3.2/zipfile.pyuZipInfos0
*'	cBsJ|EeZdZd�Ze�Zd�Zd�Zd�Zd�ZdS(uClass to handle decryption of files stored within a ZIP archive.

    ZIP supports a password-based form of encryption. Even though known
    plaintext attacks have been found against it, it is still useful
    to be able to get data out of such a file.

    Usage:
        zd = _ZipDecrypter(mypwd)
        plain_char = zd(cypher_char)
        plain_text = map(zd, cypher_text)
    cCs�d}dgd}xhtd�D]Z}|}xAtd�D]3}|d@r^|d?d@|A}q9|d?d@}q9W|||<q W|S(u�Generate a CRC-32 table.

        ZIP encryption uses the CRC32 one-byte primitive for scrambling some
        internal keys. We noticed that a direct implementation is faster than
        relying on binascii.crc32().
        I ���iiiii���(urange(upolyutableuiucrcuj((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu_GenerateCRCTable�s

cCs|d?d@|j||Ad@AS(u(Compute the CRC32 primitive on one byte.ii���i�(ucrctable(uselfuchucrc((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu_crc32�scCs=d|_d|_d|_x|D]}|j|�q"WdS(NixV4i�gE#i�xV4(ukey0ukey1ukey2u_UpdateKeys(uselfupwdup((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu__init__�s
			
cCsr|j||j�|_|j|jd@d@|_|jddd@|_|j|jd?d@|j�|_dS(Ni�I����i�ii(u_crc32ukey0ukey1ukey2(uselfuc((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu_UpdateKeys�scCs8|jdB}|||dAd?d@A}|j|�|S(uDecrypt a single character.iiii�(ukey2u_UpdateKeys(uselfucuk((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu__call__�s

N(	u__name__u
__module__u__doc__u_GenerateCRCTableucrctableu_crc32u__init__u_UpdateKeysu__call__(u
__locals__((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu
_ZipDecrypter�s
					u
_ZipDecrypterustoreushrinkureduceuimplodeutokenizeudeflateu	deflate64ubzip2ulzmauterseulz77iuwavpackiauppmdibcs�|EeZdZdd
>ZdZejd�Zddd�Z
dd�Zdd�Zd�Z
dd	�Zd
�Zd�Z�fd�Z�S(uZFile-like object for reading an archive member.
       Is returned by ZipFile.open().
    iiis*^(?P<chunk>[^\r\n]+)|(?P<newline>\n|\r\n?)cCsf||_||_||_|j|_|j|_|j|_|jtkrct	j
d
�|_n\|jtkr�t
j|j�}|r�td|j|f��q�td|jf��nd|_d|_d|_d|k|_d|_|jdk	r|jd8_n||_|j|_t|d�rY|j|_td�d	@|_n	d|_dS(Niucompression type %d (%s)ucompression type %dsiuUiuCRCI����i�(u_fileobju
_decrypteru_close_fileobju
compress_typeu_compress_typeu
compress_sizeu_compress_sizeu_compress_leftuZIP_DEFLATEDuzlibu
decompressobju
_decompressoru
ZIP_STOREDucompressor_namesugetuNotImplementedErroru_unconsumedu_readbufferu_offsetu
_universaluNoneunewlinesumodeufilenameunameuhasattruCRCu
_expected_crcucrc32u_running_crc(uselfufileobjumodeuzipinfou	decrypteru
close_fileobjudescr((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu__init__s4								cCs�|jrd|dkrd|jjd|j�d}|dkrd|j|j|�}||_|Sn|js�tjj||�Sd}x|dks�t|�|kr�|jd�}|dkr�|S|j	j
|�}|jd�}|dk	rM|j
dkrg|_
n||j
kr0|j
j|�n|jt|�7_|dS|jd�}|dkr�|d|t|��}n|jt|�7_||7}q�W|S(	urRead and return a line from the stream.

        If limit is specified, at most limit bytes will be read.
        is
isiunewlineuchunkN(u
_universalu_readbufferufindu_offsetuiouBufferedIOBaseureadlineulenupeekuPATTERNusearchugroupuNoneunewlinesuappend(uselfulimituiulineu	readaheadumatchunewlineuchunk((u./usr/local/python-3.2/lib/python3.2/zipfile.pyureadline*s8		!
cCs^|t|j�|jkrC|j|�}|jt|�8_n|j|j|jd�S(u6Returns buffered bytes without advancing the position.i(ulenu_readbufferu_offseturead(uselfunuchunk((u./usr/local/python-3.2/lib/python3.2/zipfile.pyupeek\scCsdS(NT(uTrue(uself((u./usr/local/python-3.2/lib/python3.2/zipfile.pyureadableescCs�d}|dkrd}nxs|dkr<|j|�}n2|t|�krj|j|t|��}n|St|�dkr�|S||7}qdS(u�Read and return up to n bytes.
        If the argument is omitted, None, or negative, data is read and returned until EOF is reached..
        siiNi����(uNoneuread1ulen(uselfunubufudata((u./usr/local/python-3.2/lib/python3.2/zipfile.pyureadhs	cCs^|jdkrdSt||j�d@|_|rZ|j|jkrZtd|j��ndS(NI����uBad CRC-32 for file %r(u
_expected_crcuNoneucrc32u_running_crcu
BadZipFileuname(uselfunewdataueof((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu_update_crczs
c
Css|dks|dkr$|j}nt|j�|j}|jdkrZ||t|j�krZ||t|j�}t||j�}t	||j�}|j
j|�}|jt|�8_|r�|jdk	r�t
t|j|��}n|jtkrH|j|d|jdk�|j|jd�||_d|_qZ|j|7_nt|j�dkr=||kr=|jtkr=|jj|jt|||j��}|jj|_t|j�dko�|jdk}|r||jj�7}n|j|d|�|j|jd�||_d|_n|j|j|j|�}|jt|�7_|S(u7Read up to n bytes with at most one read() system call.iueofN(uNoneuMAX_Nulenu_readbufferu_offsetu_compress_leftu_unconsumedumaxu
MIN_READ_SIZEuminu_fileobjureadu
_decrypterubytesumapu_compress_typeu
ZIP_STOREDu_update_crcuZIP_DEFLATEDu
_decompressoru
decompressuunconsumed_tailuflush(uselfunulen_readbufferunbytesudataueof((u./usr/local/python-3.2/lib/python3.2/zipfile.pyuread1�s>(!	$c
s2z|jr|jj�nWdt�j�XdS(N(u_close_fileobju_fileobjucloseusuper(uself(u	__class__(u./usr/local/python-3.2/lib/python3.2/zipfile.pyuclose�s	iNFi����i����(u__name__u
__module__u__doc__uMAX_Nu
MIN_READ_SIZEureucompileuPATTERNuNoneuFalseu__init__ureadlineupeekureadableureadu_update_crcuread1uclose(u
__locals__((u	__class__u./usr/local/python-3.2/lib/python3.2/zipfile.pyu
ZipExtFile�s

'2			
	4u
ZipExtFilecBs|EeZdZdZdedd�Zd�Zd�Z	d�Z
d�Zd�Zdd�Z
d	�Zd
�Zd�Zed��Zejd
��Zdd�Zddd�Zddd�Zdddd�Zd�Zd�Zddd�Zdd�Zd�Zd�ZdS(ud Class with methods to open, read, write, close, list zip files.

    z = ZipFile(file, mode="r", compression=ZIP_STORED, allowZip64=False)

    file: Either the path to the file, or a file-like object.
          If it is a path, the file will be opened and closed by ZipFile.
    mode: The mode can be either read "r", write "w" or append "a".
    compression: ZIP_STORED (no compression) or ZIP_DEFLATED (requires zlib).
    allowZip64: if True ZipFile will create files with ZIP64 extensions when
                needed, otherwise it will raise an exception when this would
                be necessary.

    urcCsk|dkrtd��n|tkr*n0|tkrNtsZtd��qZntd��||_d|_d|_i|_g|_	||_
|jdd	�d|_}d|_d
|_t|t�red|_||_idd6dd6d
d6}ytj|||�|_Wq�tk
ra|dkrZd}}tj|||�|_n�Yq�Xn'd|_||_t|dd�|_y�|dkr�|j�n�|dkr�d|_np|dkr$y$|j�|jj|jd�Wq0tk
r |jjdd�d|_Yq0Xntd��Wn3|j}d|_|js_|j�n�YnXdS(u>Open the ZIP file with mode read "r", write "w" or append "a".uruwuau(ZipFile() requires mode "r", "w", or "a"u.Compression requires the (missing) zlib moduleu(That compression method is not supportediubusurbuwbur+biunameiuMode must be "r", "w" or "a"N(uruwuaFT(uRuntimeErroru
ZIP_STOREDuZIP_DEFLATEDuzlibu_allowZip64uFalseu
_didModifyudebugu
NameToInfoufilelistucompressionureplaceumodeuNoneupwdu_commentu
isinstanceustru_filePassedufilenameuiouopenufpuIOErrorugetattru_RealGetContentsuTrueuseeku	start_diru
BadZipFileuclose(uselfufileumodeucompressionu
allowZip64ukeyumodeDictufp((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu__init__�sf										

		


			
cCs|S(N((uself((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu	__enter__scCs|j�dS(N(uclose(uselfutypeuvalueu	traceback((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu__exit__scCs�|j}yt|�}Wntk
r9td��YnX|sOtd��n|jdkrkt|�n|t}|t}|t|_	|t
||}|ttkr�|t
t8}n|jdkr�||}td|||�n|||_|j|jd�|j|�}tj|�}d}xO||kr�|jt�}	t|	�tkrqtd��ntjt|	�}	|	ttkr�td��n|jdkr�t|	�n|j|	t�}
|	d}|d	@r�|
jd
�}
n|
jd�}
t|
�}|j|	t�|_|j|	t �|_!|	t"|_#|	dd�\|_$|_%|_&|_'|_(|_)}
}|_*|_+|_,|	d
d�\|_-|_.|_/|
|_0|d?d|d?d
@|d@|
d?|
d?d@|
d@df|_1|j2�|j#||_#|j3j4|�||j5|j6<|t|	t|	t|	t }|jdkr5td|�q5q5WdS(u/Read in the table of contents for the ZIP file.uFile is not a zip fileiiugiven, inferred, offsetiuTruncated central directoryu&Bad magic number for central directoryiiuutf-8ucp437iiii	i�iii?utotalN(7ufpu_EndRecDatauIOErroru
BadZipFileudebuguprintu	_ECD_SIZEu_ECD_OFFSETu_ECD_COMMENTu_commentu
_ECD_LOCATIONu_ECD_SIGNATUREustringEndArchive64usizeEndCentDir64usizeEndCentDir64Locatoru	start_diruseekureaduiouBytesIOusizeCentralDirulenustructuunpackustructCentralDiru
_CD_SIGNATUREustringCentralDiru_CD_FILENAME_LENGTHudecodeuZipInfou_CD_EXTRA_FIELD_LENGTHuextrau_CD_COMMENT_LENGTHucommentu_CD_LOCAL_HEADER_OFFSETu
header_offsetucreate_versionu
create_systemuextract_versionureservedu	flag_bitsu
compress_typeuCRCu
compress_sizeu	file_sizeuvolumeu
internal_attru
external_attru	_raw_timeu	date_timeu_decodeExtraufilelistuappendu
NameToInfoufilename(uselfufpuendrecusize_cdu	offset_cduconcatuinferredudatautotalucentdirufilenameuflagsuxutud((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu_RealGetContentssj	










L"	&
"cCs.g}x!|jD]}|j|j�qW|S(u+Return a list of file names in the archive.(ufilelistuappendufilename(uselfuludata((u./usr/local/python-3.2/lib/python3.2/zipfile.pyunamelistjscCs|jS(uJReturn a list of class ZipInfo instances for files in the
        archive.(ufilelist(uself((u./usr/local/python-3.2/lib/python3.2/zipfile.pyuinfolistqscCsftdd
d|�xK|jD]@}d|jdd�}td	|j||jfd|�qWdS(u+Print a table of contents for the zip file.u%-46s %19s %12su	File NameuModified    uSizeufileu%d-%02d-%02d %02d:%02d:%02dNiu
%-46s %s %12d(u	File NameuModified    uSize(uprintufilelistu	date_timeufilenameu	file_size(uselfufileuzinfoudate((u./usr/local/python-3.2/lib/python3.2/zipfile.pyuprintdirvs
cCsrd}xe|jD]Z}y8|j|jd��}x|j|�rFq4WWdQXWqtk
ri|jSYqXqWdS(u%Read all the files and check the CRC.iiurNi(ufilelistuopenufilenameureadu
BadZipFile(uselfu
chunk_sizeuzinfouf((u./usr/local/python-3.2/lib/python3.2/zipfile.pyutestzips
cCs5|jj|�}|dkr1td|��n|S(u,Return the instance of ZipInfo given 'name'.u(There is no item named %r in the archiveN(u
NameToInfougetuNoneuKeyError(uselfunameuinfo((u./usr/local/python-3.2/lib/python3.2/zipfile.pyugetinfo�s
cCsN|r/t|t�r/tdt|���n|rA||_n	d|_dS(u)Set default password for encrypted files.upwd: expected bytes, got %sN(u
isinstanceubytesu	TypeErrorutypeupwduNone(uselfupwd((u./usr/local/python-3.2/lib/python3.2/zipfile.pyusetpassword�s
cCs|jS(u.The comment text associated with the ZIP file.(u_comment(uself((u./usr/local/python-3.2/lib/python3.2/zipfile.pyucomment�scCs}t|t�s(tdt|���nt|�tkrg|jrTtdt�n|dt�}n||_d|_
dS(Nucomment: expected bytes, got %su3Archive comment is too long; truncating to %d bytesT(u
isinstanceubytesu	TypeErrorutypeulenuZIP_MAX_COMMENTudebuguprintu_commentuTrueu
_didModify(uselfucomment((u./usr/local/python-3.2/lib/python3.2/zipfile.pyucomment�s		cCs,|j|d|��}|j�SWdQXdS(u)Return file bytes (as a string) for name.urN(uopenuread(uselfunameupwdufp((u./usr/local/python-3.2/lib/python3.2/zipfile.pyuread�scCs�|dkrtd��n|rJt|t�rJtdt|���n|jsbtd��n|jrw|j}ntj|j	d�}yt|t
�r�|}n|j|�}|j|j
d�|jt�}t|�tkr�td	��ntjt|�}|ttkr*td
��n|j|t�}|tr[|j|t�n|jd@rz|jd�}n|jd
�}||jkr�td|j|f��n|jd@}	d}
|	r�|s�|j}n|s�td|��nt|�}
|jd�}tt |
|dd���}|jd@rS|j!d?d@}
n|j"d?d@}
|d|
kr�td|��q�nt#||||
d|j�SWn!|js�|j$�n�YnXdS(u#Return file-like object for 'name'.uruUurUu&open() requires mode "r", "U", or "rU"upwd: expected bytes, got %su3Attempt to read ZIP archive that was already closedurbiuTruncated file headeru Bad magic number for file headeriuutf-8ucp437u/File name in directory %r and header %r differ.iu6File %s is encrypted, password required for extractioniii�iiuBad password for fileu
close_fileobjN(uruUurU(%uRuntimeErroru
isinstanceubytesu	TypeErrorutypeufpu_filePasseduiouopenufilenameuZipInfougetinfouseeku
header_offsetureadusizeFileHeaderulenu
BadZipFileustructuunpackustructFileHeaderu
_FH_SIGNATUREustringFileHeaderu_FH_FILENAME_LENGTHu_FH_EXTRA_FIELD_LENGTHu	flag_bitsudecodeu
orig_filenameuNoneupwdu
_ZipDecrypterulistumapu	_raw_timeuCRCu
ZipExtFileuclose(uselfunameumodeupwduzef_fileuzinfoufheaderufnameu	fname_struis_encrypteduzduheaderuhu
check_byte((u./usr/local/python-3.2/lib/python3.2/zipfile.pyuopen�sj			




	
cCsOt|t�s!|j|�}n|dkr<tj�}n|j|||�S(u#Extract a member from the archive to the current working directory,
           using its full name. Its file information is extracted as accurately
           as possible. `member' may be a filename or a ZipInfo object. You can
           specify a different directory using `path'.
        N(u
isinstanceuZipInfougetinfouNoneuosugetcwdu_extract_member(uselfumemberupathupwd((u./usr/local/python-3.2/lib/python3.2/zipfile.pyuextract	s
cCsC|dkr|j�}nx!|D]}|j|||�q"WdS(u�Extract all members from the archive to the current working
           directory. `path' specifies a different directory to extract to.
           `members' is optional and must be a subset of the list returned
           by namelist().
        N(uNoneunamelistuextract(uselfupathumembersupwduzipinfo((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu
extractalls
c
Cs�|jjdtjj�}tjjrH|jtjjtjj�}ntjj|�d}tjjjd�|jtjj�D��}tjjdkrd}t	j
|dt|��}|j|�}d�|jtjj�D�}tjjjd�|D��}ntjj||�}tjj
|�}tjj|�}|rrtjj|�rrtj|�n|jddkr�tjj|�s�tj|�n|S|j|d	|��/}t|d
��}	tj||	�WdQXWdQX|S(
ubExtract the ZipInfo object 'member' to a physical
           file on the path targetpath.
        u/icss6|],}|dtjjtjjfkr|VqdS(uN(uosupathucurdirupardir(u.0ux((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu	<genexpr>0su\u:<>|"?*u_css|]}|jd�VqdS(u.N(urstrip(u.0ux((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu	<genexpr>8scss|]}|r|VqdS(N((u.0ux((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu	<genexpr>9supwduwbNi����(ufilenameureplaceuosupathusepualtsepu
splitdriveujoinusplitustru	maketransulenu	translateunormpathudirnameuexistsumakedirsuisdirumkdiruopenushutilucopyfileobj(
uselfumemberu
targetpathupwduarcnameuillegalutableu	upperdirsusourceutarget((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu_extract_member#s0!."cCs|j|jkr1|jr1td|j�q1n|jdkrOtd��n|jsgtd��n|jtkr�t	r�td��n|jt
tfkr�td��n|jtkr�|j
s�td��q�n|jtkr|j
std	��qnd
S(u6Check for errors before writing a file to the archive.uDuplicate name:uwuau write() requires mode "w" or "a"u4Attempt to write ZIP archive that was already closedu.Compression requires the (missing) zlib moduleu(That compression method is not supportedu'Filesize would require ZIP64 extensionsu+Zipfile size would require ZIP64 extensionsN(uwua(ufilenameu
NameToInfoudebuguprintumodeuRuntimeErrorufpu
compress_typeuZIP_DEFLATEDuzlibu
ZIP_STOREDu	file_sizeuZIP64_LIMITu_allowZip64uLargeZipFileu
header_offset(uselfuzinfo((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu_writecheckNs(				cCs�|jstd��ntj|�}tj|j�}tj|j�}|dd�}|dkrp|}ntj
jtj
j|�d�}x0|dtj
tjfkr�|dd�}q�W|r�|d7}nt||�}|dd@d>|_|dkr|j|_n	||_|j|_d|_|jj�|_|j|�d|_|r�d|_d|_d|_|jj|�||j|j <|jj!|j"d��dSt$|d	��	}	d|_}
d|_}|j%o|jd
t&k}|jj!|j"|��|jt'krIt(j)t(j*t(j+d�}
nd}
d}xw|	j,d�}|sqPn|t-|�}t.||
�d@}
|
r�|
j/|�}|t-|�}n|jj!|�qXWdQX|
r|
j0�}|t-|�}|jj!|�||_n	||_|
|_||_|rw|j%rw|t&krYtd��n|t&krwtd��qwn|jj�}|jj1|jd�|jj!|j"|��|jj1|d�|jj|�||j|j <dS(uLPut the bytes from filename into the archive under the name
        arcname.u7Attempt to write to ZIP archive that was already closediiiNu/i��iurbg�������?iiiI����u*File size has increased during compressingu-Compressed size larger than uncompressed sizeTFi�i (2ufpuRuntimeErroruosustatuS_ISDIRust_modeutimeu	localtimeust_mtimeuNoneupathunormpathu
splitdriveusepualtsepuZipInfou
external_attrucompressionu
compress_typeust_sizeu	file_sizeu	flag_bitsutellu
header_offsetu_writecheckuTrueu
_didModifyu
compress_sizeuCRCufilelistuappendu
NameToInfoufilenameuwriteu
FileHeaderuFalseuopenu_allowZip64uZIP64_LIMITuZIP_DEFLATEDuzlibucompressobjuZ_DEFAULT_COMPRESSIONuDEFLATEDureadulenucrc32ucompressuflushuseek(uselfufilenameuarcnameu
compress_typeustuisdirumtimeu	date_timeuzinfoufpuCRCu
compress_sizeuzip64ucmpru	file_sizeubufuposition((u./usr/local/python-3.2/lib/python3.2/zipfile.pyuwritees�		"
		
				

				cCs;t|t�r!|jd�}nt|t�svtd|dtjtj��dd��}|j|_d|_n|}|j	s�t
d��nt|�|_|j	j
�|_|dk	r�||_n|j|�d|_t|�d	@|_|jtkrKtjtjtjd�}|j|�|j�}t|�|_n|j|_|jtkpr|jtk}|r�|jr�td��n|j	j |j!|��|j	j |�|j"d@r
|r�d
nd}|j	j t#j$||j|j|j��n|j	j�|j%j&|�||j'|j(<dS(uWrite a file into the archive.  The contents is 'data', which
        may be either a 'str' or a 'bytes' instance; if it is a 'str',
        it is encoded as UTF-8 first.
        'zinfo_or_arcname' is either a ZipInfo instance or
        the name of the file in the archive.uutf-8ufilenameu	date_timeNii�iu7Attempt to write to ZIP archive that was already closedI����iu'Filesize would require ZIP64 extensionsiu<LQQu<LLLi�Ti�()u
isinstanceustruencodeuZipInfoutimeu	localtimeucompressionu
compress_typeu
external_attrufpuRuntimeErrorulenu	file_sizeutellu
header_offsetuNoneu_writecheckuTrueu
_didModifyucrc32uCRCuZIP_DEFLATEDuzlibucompressobjuZ_DEFAULT_COMPRESSIONuDEFLATEDucompressuflushu
compress_sizeuZIP64_LIMITu_allowZip64uLargeZipFileuwriteu
FileHeaderu	flag_bitsustructupackufilelistuappendu
NameToInfoufilename(uselfuzinfo_or_arcnameudatau
compress_typeuzinfoucouzip64ufmt((u./usr/local/python-3.2/lib/python3.2/zipfile.pyuwritestr�sJ"	
	

cCs|j�dS(u2Call the "close()" method in case the user forgot.N(uclose(uself((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu__del__�sc$Cs�|jdkrdSzV|jdkrh|jrhd}|jj�}x�|jD]�}|d}|j}|ddd>|dd>B|d	B}|d
d>|dd>B|dd	B}g}|jtks�|j	tkr|j
|j�|j
|j	�d
}d
}	n|j}|j	}	|jtkr?|j
|j�d
}
n	|j}
|j}|r�t
jddt|�ddt|�|�|}td|j�}td|j�}
n|j}|j}
y�|j�\}}t
jtt|
|j||j||j|||j|	|t|�t|�t|j�d|j|j|
�}Wn�tk
r�ttt|
|j||j|j|j|||j|	|t|j �t|�t|j�d|j|j|
fdt!j"��YnX|jj#|�|jj#|�|jj#|�|jj#|j�qMW|jj�}|}||}|}|t$ksm|tksm|tkrt
jt%t&ddddd||||�}|jj#|�t
jt't(d|d�}|jj#|�t)|d�}t)|d
�}t)|d
�}nt
jt*t+dd||||t|j,��	}|jj#|�|jj#|j,�|jj-�nWd|j}d|_|j.s�|j/�nXdS(uJClose the file, and for mode "w" and "a" write the ending
        records.Nuwuaiii�i	iiiiiI����u<HHuQii-ufilei,i��(uwua(0ufpuNoneumodeu
_didModifyutellufilelistu	date_timeu	file_sizeuZIP64_LIMITu
compress_sizeuappendu
header_offsetuextraustructupackulenumaxuextract_versionucreate_versionu_encodeFilenameFlagsustructCentralDirustringCentralDiru
create_systemureservedu
compress_typeuCRCucommentu
internal_attru
external_attruDeprecationWarninguprintu	flag_bitsufilenameusysustderruwriteuZIP_FILECOUNT_LIMITustructEndArchive64ustringEndArchive64ustructEndArchive64LocatorustringEndArchive64LocatoruminustructEndArchiveustringEndArchiveu_commentuflushu_filePasseduclose(uselfucountupos1uzinfoudtudosdateudostimeuextrau	file_sizeu
compress_sizeu
header_offsetu
extra_datauextract_versionucreate_versionufilenameu	flag_bitsucentdirupos2ucentDirCountucentDirSizeu
centDirOffsetuzip64endrecuzip64locrecuendrecufp((u./usr/local/python-3.2/lib/python3.2/zipfile.pyuclose�s�
	&&									

!
			NF(u__name__u
__module__u__doc__uNoneufpu
ZIP_STOREDuFalseu__init__u	__enter__u__exit__u_RealGetContentsunamelistuinfolistuprintdirutestzipugetinfousetpasswordupropertyucommentusetterureaduopenuextractu
extractallu_extract_memberu_writecheckuwriteuwritestru__del__uclose(u
__locals__((u./usr/local/python-3.2/lib/python3.2/zipfile.pyuZipFile�s0

H			K				
				
T	+	Y2	cBs>|EeZdZdedd	d�Zdd�Zd�ZdS(
uDClass to create ZIP archives with Python library files and packages.uric	Cs/tj||d|d|d|�||_dS(Numodeucompressionu
allowZip64(uZipFileu__init__u	_optimize(uselfufileumodeucompressionu
allowZip64uoptimize((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu__init__`suc
Cstjj|�\}}tjj|�r�tjj|d�}tjj|�r�|rjd||f}n|}|jr�td|d|�n|j|dd
�|�\}}|jr�td|�n|j	||�tj
|�}|jd�x�|D]�}	tjj||	�}
tjj|	�\}}tjj|
�rytjjtjj|
d��r�|j
|
|�q�q�|dkr�|j|
dd�|�\}}|jr�td|�n|j	||�q�q�Wq|jr�td	|�nxtj
|�D]�}	tjj||	�}
tjj|	�\}}|dkr|j|
dd�|�\}}|jr}td|�n|j	||�qqWnp|dd
�dkr�td��n|j|dd�|�\}}|jr�td|�n|j	||�d
S(u,Add all files from "pathname" to the ZIP archive.

        If pathname is a package directory, search the directory and
        all package subdirectories recursively for all *.py and enter
        the modules into the archive.  If pathname is a plain
        directory, listdir *.py and enter all modules.  Else, pathname
        must be a Python *.py file and the module will be put into the
        archive.  Added modules are always module.pyo or module.pyc.
        This method will compile the module.py into module.pyc if
        necessary.
        u__init__.pyu%s/%suAdding package inuasiiuAddingu.pyuAdding files from directoryNu.Files added with writepy() must end with ".py"uAdding filei����i����i����i����i����(uosupathusplituisdirujoinuisfileudebuguprintu
_get_codenameuwriteulistdiruremoveusplitextuwritepyuRuntimeError(
uselfupathnameubasenameudirunameuinitnameufnameuarcnameudirlistufilenameupathurootuext((u./usr/local/python-3.2/lib/python3.2/zipfile.pyuwritepyfsZ	"	

!			"	csqd	�fd�}|d}|d}|d}tj|d
�}tj|d�}�jdkr�tjj|�r�tj|�j	tj|�j	kr�|}	}
q8tjj|�r�tj|�j	tj|�j	kr�|}	}
q8tjj|�r.tj|�j	tj|�j	kr.|}
|}	q8tjj|�rstj|�j	tj|�j	krs|}
|}	q8||�r�t
r�|n|}
t
r�|n|}	q8|}
}	n��jdkr�|}
|}	n|}
|}	tjj|
�otj|
�j	tj|�j	ks8||d�j�s8|}
}	q8ntjj|	�d}|rgd||f}n|
|fS(
uReturn (filename, archivename) for the path.

        Given a module name path, return the correct file path and
        archive name, compiling if necessary.  For example, given
        /python/lib/string, return (/python/lib/string.pyc, string).
        ics�ddl}�jr%td|�ny|j|ddd|�Wn9|jk
r}}zt|j�dSWYdd}~XnXdS(Niu	CompilingudoraiseuoptimizeTF(u
py_compileudebuguprintucompileuTrueuPyCompileErrorumsguFalse(ufileuoptimizeu
py_compileuerr(uself(u./usr/local/python-3.2/lib/python3.2/zipfile.pyu_compile�s	
u.pyu.pycu.pyoiuoptimizeu%s/%si����TFi����(uimpucache_from_sourceuTrueuFalseu	_optimizeuosupathuisfileustatust_mtimeu	__debug__usplit(uselfupathnameubasenameu_compileufile_pyufile_pycufile_pyoupycache_pycupycache_pyouarcnameufnameuarchivename((uselfu./usr/local/python-3.2/lib/python3.2/zipfile.pyu
_get_codename�sL


$
$
$	$	
	$NFi����(u__name__u
__module__u__doc__u
ZIP_STOREDuFalseu__init__uwritepyu
_get_codename(u
__locals__((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu	PyZipFile]s

Acs/ddl}|jd�}|dkr=tjdd�}n|sT|ddkrnt|�tjd�n|ddkr�t|�dkr�t|�tjd�nt|dd	��}|j	�WdQXnX|ddkr`t|�dkrt|�tjd�nt|dd	��}|j
�}WdQX|rStd
j|��ntd�n�|ddkr�t|�dkr�t|�tjd�nt|dd	���}|d}x�|j�D]�}|j
d
�rtjj||dd��}ntjj||�}tjj|�}tjj|�sItj|�nt|d��}	|	j|j|��WdQXq�WWdQXn�|ddkr+t|�dkr�t|�tjd�n�fd��t|dddd��>}x4|dd�D]"}
�||
tjj|
��q�WWdQXndS(NiuE        Usage:
            zipfile.py -l zipfile.zip        # Show listing of a zipfile
            zipfile.py -t zipfile.zip        # Test if a zipfile is valid
            zipfile.py -e zipfile.zip target # Extract zipfile into target dir
            zipfile.py -c zipfile.zip src ... # Create zipfile from sources
        iu-lu-cu-eu-tiuru.The following enclosed file is corrupted: {!r}uDone testingiu./uwbcs�tjj|�r(|j||t�n]tjj|�r�xHtj|�D]4}�|tjj||�tjj||��qJWndS(N(uosupathuisfileuwriteuZIP_DEFLATEDuisdirulistdirujoin(uzfupathuzippathunm(uaddToZip(u./usr/local/python-3.2/lib/python3.2/zipfile.pyuaddToZip&suwu
allowZip64(u-lu-cu-eu-tT(utextwrapudedentuNoneusysuargvuprintuexitulenuZipFileuprintdirutestzipuformatunamelistu
startswithuosupathujoinudirnameuexistsumakedirsuopenuwriteureaduTrueubasename(uargsutextwrapuUSAGEuzfubadfileuoutupathutgtutgtdirufpusrc((uaddToZipu./usr/local/python-3.2/lib/python3.2/zipfile.pyumain�s\	





")
	u__main__(ku__doc__uiouosureuimpusysutimeustatushutilustructubinasciiuzlibucrc32uImportErroruNoneu__all__u	Exceptionu
BadZipFileuLargeZipFileuerroru
BadZipfileuZIP64_LIMITuZIP_FILECOUNT_LIMITuZIP_MAX_COMMENTu
ZIP_STOREDuZIP_DEFLATEDustructEndArchiveustringEndArchiveucalcsizeusizeEndCentDiru_ECD_SIGNATUREu_ECD_DISK_NUMBERu_ECD_DISK_STARTu_ECD_ENTRIES_THIS_DISKu_ECD_ENTRIES_TOTALu	_ECD_SIZEu_ECD_OFFSETu_ECD_COMMENT_SIZEu_ECD_COMMENTu
_ECD_LOCATIONustructCentralDirustringCentralDirusizeCentralDiru
_CD_SIGNATUREu_CD_CREATE_VERSIONu_CD_CREATE_SYSTEMu_CD_EXTRACT_VERSIONu_CD_EXTRACT_SYSTEMu
_CD_FLAG_BITSu_CD_COMPRESS_TYPEu_CD_TIMEu_CD_DATEu_CD_CRCu_CD_COMPRESSED_SIZEu_CD_UNCOMPRESSED_SIZEu_CD_FILENAME_LENGTHu_CD_EXTRA_FIELD_LENGTHu_CD_COMMENT_LENGTHu_CD_DISK_NUMBER_STARTu_CD_INTERNAL_FILE_ATTRIBUTESu_CD_EXTERNAL_FILE_ATTRIBUTESu_CD_LOCAL_HEADER_OFFSETustructFileHeaderustringFileHeaderusizeFileHeaderu
_FH_SIGNATUREu_FH_EXTRACT_VERSIONu_FH_EXTRACT_SYSTEMu_FH_GENERAL_PURPOSE_FLAG_BITSu_FH_COMPRESSION_METHODu_FH_LAST_MOD_TIMEu_FH_LAST_MOD_DATEu_FH_CRCu_FH_COMPRESSED_SIZEu_FH_UNCOMPRESSED_SIZEu_FH_FILENAME_LENGTHu_FH_EXTRA_FIELD_LENGTHustructEndArchive64LocatorustringEndArchive64LocatorusizeEndCentDir64LocatorustructEndArchive64ustringEndArchive64usizeEndCentDir64u_CD64_SIGNATUREu_CD64_DIRECTORY_RECSIZEu_CD64_CREATE_VERSIONu_CD64_EXTRACT_VERSIONu_CD64_DISK_NUMBERu_CD64_DISK_NUMBER_STARTu_CD64_NUMBER_ENTRIES_THIS_DISKu_CD64_NUMBER_ENTRIES_TOTALu_CD64_DIRECTORY_SIZEu_CD64_OFFSET_START_CENTDIRu_check_zipfileu
is_zipfileu
_EndRecData64u_EndRecDatauobjectuZipInfou
_ZipDecrypterucompressor_namesuBufferedIOBaseu
ZipExtFileuZipFileu	PyZipFileumainu__name__(((u./usr/local/python-3.2/lib/python3.2/zipfile.pyu<module>s�



			+	=�;
�����F
© 2025 GrazzMean