config root man

Current Path : /compat/linux/proc/self/root/usr/local/lib/python2.5/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/self/root/usr/local/lib/python2.5/zipfile.pyc

hRc@s_dZddkZddkZddkZddkZddkZddkZyddkZWnej
o
e	ZnXddddddd	d
dg	Z
defdYZdefd
YZ
eZdd>dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#dZ$d"Z%d#Z&d$Z'd%Z(d&Z)d'Z*d(Z+d)Z,d*Z-d+Z.dZ/dZ0dZ1dZ2dZ3dZ4d Z5d!Z6dZ7d"Z8d#Z9d$Z:d,Z;d-Z<d.Z=de>fd/YZ?d	fd0YZ@d
e@fd1YZAe	d2ZBeCd3joeBndS(4s
Read and write ZIP files.
iNt
BadZipfileterrort
ZIP_STOREDtZIP_DEFLATEDt
is_zipfiletZipInfotZipFilet	PyZipFiletLargeZipFilecBseZRS((t__name__t
__module__(((s#/usr/local/lib/python2.5/zipfile.pyRscBseZdZRS(su
    Raised when writing a zipfile, the zipfile requires ZIP64 extensions
    and those extensions are disabled.
    (R	R
t__doc__(((s#/usr/local/lib/python2.5/zipfile.pyRsiiiis<4s4H2LHsPKs<4s4B4HlLL5HLLsPKs<4s2B4HlLL2HsPKs<4slqlsPKs<4sqhhllqqqqsPKiiiiiii	i
iii
iiiiicCsRy8t|d}t|}|i|otSnWntj
onXtS(s?Quickly see if file is a ZIP file by checking the magic number.trb(topent_EndRecDatatclosetTruetIOErrortFalse(tfilenametfpintendrec((s#/usr/local/lib/python2.5/zipfile.pyRRs
c
CsJtit}|i||d|i|}tit|\}}}}|tjo|Sn|djp
|djotdntit}	|i|||	d|i|	}tit|\
}}
}}}
}}}}}|t	jo|Sn|
|d<||d<||d<||d<||d<||d<|S(	sM
    Read the ZIP64 end-of-archive records and use that to update endrec
    iiis3zipfiles that span multiple disks are not supportediiii(
tstructtcalcsizetstructEndArchive64LocatortseektreadtunpacktstringEndArchive64LocatorRtstructEndArchive64tstringEndArchive64(RtoffsetRtlocatorSizetdatatsigtdisknotrelofftdiskstendArchiveSizetsztcreate_versiontread_versiontdisk_numtdisk_dirtdircountt	dircount2tdirsizet	diroffset((s#/usr/local/lib/python2.5/zipfile.pyt
_EndRecData64^s*
0






cCs|idd|id}|i}|dd!tjo|ddjoztit|}t|}|id|i|d|d	d
jp|d	djot	|d|Sn|Snt
|d}|i||d|i}|it}|djotit|||d!}t|}||d}|d
t|joe|i||i||||d	d
jp|d	djot	||||Sn|SqndS(sReturn 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.iiiiiittiiIiiNi(
RttellRtstringEndArchiveRRtstructEndArchivetlisttappendR0tmintrfindtlen(RtfilesizeR!Rt	END_BLOCKtstarttcomment((s#/usr/local/lib/python2.5/zipfile.pyRs4%
"

"cBs5eZdZdZdddZdZdZRS(s>Class with attributes describing each file in the ZIP archive.t
orig_filenameRt	date_timet
compress_typeR>textrat
create_systemR(textract_versiontreservedt	flag_bitstvolumet
internal_attrt
external_attrt
header_offsettCRCt
compress_sizet	file_sizetNoNameiiicCs||_|itd}|djo|d|!}ntidjo)ti|jo|itid}n||_||_t|_	d|_
d|_ti
djo
d|_n
d|_d|_d|_d|_d|_d|_d|_d|_dS(Nit/R2twin32ii(R?tfindtchrtostseptreplaceRR@RRAR>RBtsystplatformRCR(RDRERFRGRHRI(tselfRR@t	null_byte((s#/usr/local/lib/python2.5/zipfile.pyt__init__s*	
 					
							c
Cs||i}|ddd>|dd>B|dB}|dd>|d	d>B|ddB}|id
@od}}}n|i}|i}|i}|i}|tjp
|tjold}|ti|dti	|d	||}d}d}t
d
|i|_t
d
|i|_ntit
t|i|i|i|i|||||t|it|
}	|	|i|S(s'Return the per-file header as a string.iii	iiiiiiis<hhqqIi-(R@RFRKRLRMRBtZIP64_LIMITRtpackRtmaxRDR(tstructFileHeadertstringFileHeaderRERAR:R(
RXtdttdosdatetdostimeRKRLRMRBtfmttheader((s#/usr/local/lib/python2.5/zipfile.pyt
FileHeaders.	&&				 cCs|i}ti}x|o|d|d \}}|djo`|djo|d|dd!}nv|djo|d|dd	!}nO|d
jo|d|dd!}n(|d
jo
d}ntd|fd
}|idjp|idjo|||_|d7}n|idjp|idjo|||_|d7}n|idjp|idjo$|i}|||_|d7}qn||d}qWdS(Ns<hhiiis<qqqiis<qqiis<qiisCorrupt extra field %sil((RBRRtRuntimeErrorRMRLRJ(RXRBRttptlntcountstidxtold((s#/usr/local/lib/python2.5/zipfile.pyt_decodeExtras6		





 
 
 	
(s
orig_filenamesfilenames	date_times
compress_typescommentsextras
create_systemscreate_versionsextract_versionsreserveds	flag_bitssvolumes
internal_attrs
external_attrs
header_offsetsCRCs
compress_sizes	file_size(iiiiii(R	R
Rt	__slots__RZReRl(((s#/usr/local/lib/python2.5/zipfile.pyRs,&	!cBseZdZdZdeedZdZdZ	dZ
dZdZdZ
d	Zd
ZdZdddZd
ZdZdZRS(sc Class with methods to open, read, write, close, list zip files.

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

    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.

    trcCs||_t|_|tjon/|tjotp
tdqQn
tdd|_h|_g|_	||_
|iddd|_}t
|toMd|_||_hdd<dd	<d
d<}t||||_n(d|_||_t|d
d|_|djo|in|d	jon|djoQy$|i|ii|idWqtj
o|iiddqXn.|ip|iid|_ntddS(s>Open the ZIP file with mode read "r", write "w" or append "a".s.Compression requires the (missing) zlib modules(That compression method is not supporteditbR2RRntwbtwsr+btaitnameisMode must be "r", "w" or "a"N(t_allowZip64Rt
_didModifyRRtzlibRftdebugt
NameToInfotfilelisttcompressionRUtmodet
isinstancet
basestringt_filePassedRR
tfptgetattrtNonet_GetContentst_RealGetContentsRt	start_dirRR(RXtfileR{Rzt
allowZip64tkeytmodeDict((s#/usr/local/lib/python2.5/zipfile.pyRZ<sH		

							!		






cCsOy|iWn:tj
o.|ip|iid|_nnXdS(sORead the directory, making sure we close the file if the format
        is bad.N(RRR~RRR(RX((s#/usr/local/lib/python2.5/zipfile.pyRjs


c
Cs|i}t|}|p
tdn|idjo	|GHn|d}|d}|d|_|dtjo|d|dd}n|d|}||}|id	jod
G|G|G|GHn|||_|i|id|i|}t	i
|}d}x||jo|id}	|d}|	dd
!tjo
tdnti
t|	}	|id	jo	|	GHn|i|	t}
t|
}|i|	t|_|i|	t|_||	t|	t|	t}|	t|_|	dd!\|_|_|_|_|_|_}}|_|_|_|	dd!\|_|_ |_!|d?d|d?d@|d@|d?|d?d@|d@d	f|_"|i#|i||_|i$i%|||i&|i'<|id	jo
dG|GHqqWdS(s/Read in the table of contents for the ZIP file.sFile is not a zip fileiiiii	i8iisgiven, inferred, offsetii.is&Bad magic number for central directoryiiiiiii?ttotalN((RRRRwR>R[RRRt	cStringIOtStringIOtstringCentralDirRRtstructCentralDirt_CD_FILENAME_LENGTHRt_CD_EXTRA_FIELD_LENGTHRBt_CD_COMMENT_LENGTHt_CD_LOCAL_HEADER_OFFSETRJR(RCRDRERFRARKRLRMRGRHRIR@RlRyR7RxR(
RXRRtsize_cdt	offset_cdtxtconcatR!RtcentdirRtttd((s#/usr/local/lib/python2.5/zipfile.pyRusZ	
	







	
I&
cCs.g}x!|iD]}|i|iqW|S(s+Return a list of file names in the archive.(RyR7R(RXtlR!((s#/usr/local/lib/python2.5/zipfile.pytnamelists

cCs|iS(sJReturn a list of class ZipInfo instances for files in the
        archive.(Ry(RX((s#/usr/local/lib/python2.5/zipfile.pytinfolistscCsJdd	GHx:|iD]/}d|id }d|i||ifGHqWdS(
s+Print a table of contents for the zip file.s%-46s %19s %12ss	File NamesModified    tSizes%d-%02d-%02d %02d:%02d:%02dis
%-46s %s %12dN(s	File NamesModified    R(RyR@RRM(RXtzinfotdate((s#/usr/local/lib/python2.5/zipfile.pytprintdirs
	
cCsIxB|iD]7}y|i|iWq
tj
o|iSq
Xq
WdS(s%Read all the files and check the CRC.N(RyRRR(RXR((s#/usr/local/lib/python2.5/zipfile.pyttestzips
cCs|i|S(s,Return the instance of ZipInfo given 'name'.(Rx(RXRs((s#/usr/local/lib/python2.5/zipfile.pytgetinfosc
Cs
|idjo
tdn|ip
tdn|i|}|ii}|ii|id|iid}|dd!tjo
t	dnt
it|}|ii|t
}|to|ii|tn||ijot	d	|i|fn|ii|i}|ii|d|itjon|itjodtp
td
ntid}|i|}|id|i}|o||}qnt	d
|i|fti|}	|	|ijot	d|n|S(s)Return file bytes (as a string) for name.RnRrsread() requires mode "r" or "a"s3Attempt to read ZIP archive that was already closediiis Bad magic number for file headers3File name in directory "%s" and header "%s" differ.s1De-compression requires the (missing) zlib moduleitZs-Unsupported compression method %d for file %ssBad CRC-32 for file %s(RnRr(R{RfRRR3RRJRR_RRRR^t_FH_FILENAME_LENGTHt_FH_EXTRA_FIELD_LENGTHR?RLRARRRvt
decompressobjt
decompresstflushtbinasciitcrc32RK(
RXRsRtfilepostfheadertfnametbytestdctextcrc((s#/usr/local/lib/python2.5/zipfile.pyRsN




cCs
|i|ijo|iodG|iGHq1n|idjo
tdn|ip
tdn|itjoto
tdn|it	tfjo
tdn|i
tjo|ipt
dqn|itjo|ipt
d	q	nd
S(s6Check for errors before writing a file to the archive.sDuplicate name:RqRrs write() requires mode "w" or "a"s4Attempt to write ZIP archive that was already closeds.Compression requires the (missing) zlib modules(That compression method is not supporteds'Filesize would require ZIP64 extensionss+Zipfile size would require ZIP64 extensionsN(RqRr(RRxRwR{RfRRARRvRRMR[RtRRJ(RXR((s#/usr/local/lib/python2.5/zipfile.pyt_writechecks(







cCsti|}ti|i}|dd!}|djo
|}ntiitii|d}x,|dti	ti
fjo|d}qjWt||}|dd@d>|_|djo|i
|_n
||_|i|_d|_|ii|_|i|t|_t|d}d|_}	d|_}
d|_}|ii|i|itjotiti ti!d}nd}xz|i"d
}
|
pPn|t#|
}t$i%|
|	}	|o#|i&|
}
|
t#|
}
n|ii|
q|i'|o9|i(}
|
t#|
}
|ii|
|
|_n
||_|	|_||_|ii}|ii)|id
d|iit*i+d|i|i|i|ii)|d|i,i-|||i.|i/<dS(sLPut the bytes from filename into the archive under the name
        arcname.iiiilRiiiis<lLLNi (0RStstatttimet	localtimetst_mtimeRtpathtnormpatht
splitdriveRTtaltsepRRIRzRAtst_sizeRMRFRR3RJRRRuR
RKRLtwriteReRRvtcompressobjtZ_DEFAULT_COMPRESSIONtDEFLATEDRR:RRtcompressRRRRR\RyR7RxR(RXRtarcnameRAtsttmtimeR@RRRKRLRMtcmprtbuftposition((s#/usr/local/lib/python2.5/zipfile.pyRsl


"
		
	




			
cCst|tp8td|dtitid }|i|_n|}t||_|ii	|_
|i|t|_
ti||_|itjoGtititid}|i||i}t||_n
|i|_|ii	|_
|ii|i|ii||ii|id@o/|iitid|i|i|in|ii|||i |i!<dS(sWrite a file into the archive.  The contents is the string
        'bytes'.  'zinfo_or_arcname' is either a ZipInfo instance or
        the name of the file in the archive.RR@iiis<lLLN("R|RRRRzRAR:RMRR3RJRRRuRRRKRRvRRRRRRLRReRFRR\RyR7RxR(RXtzinfo_or_arcnameRRtco((s#/usr/local/lib/python2.5/zipfile.pytwritestr[s2
	
cCs|idS(s2Call the "close()" method in case the user forgot.N(R(RX((s#/usr/local/lib/python2.5/zipfile.pyt__del__|scCs|idjodSn|idjo|io~d}|ii}xD|iD]9}|d}|i}|ddd>|dd>B|d	B}|d
d>|dd>B|dd	B}g}|itjp|i	tjo0|i
|i|i
|i	d
}d
}	n|i}|i	}	|itjo|i
|id}
n
|i}
|i}|o\t
iddt|ddt|||}td|i}td|i}
n|i}|i}
t
itt|
|i||i|i|i|||i|	|t|it|t|id|i|i|
}|ii||ii|i|ii||ii|iqQW|ii}|tjot
itt ddddd|||||}|ii|t
it!t"d|d}|ii||ii}t
it#t$dd||||dd	}|ii|n<t
it#t$dd|||||d	}|ii||ii%n|i&p|ii'nd|_dS(sJClose the file, and for mode "w" and "a" write the ending
        records.NRqRriiii	iiiiiIis<hhtqii-i,(RqRr((RRR{RuR3RyR@RMR[RLR7RJRBRR\R:R]RDR(RRRCRERFRARKRR>RHRIRRRRRR5R4RR~R(RXtcounttpos1RR`RaRbRBRMRLRJt
extra_dataRDR(Rtpos2tzip64endrectzip64locrectpos3R((s#/usr/local/lib/python2.5/zipfile.pyRs

	&&
		
					!	
%
N(R	R
RRRRRRZRRRRRRRRRRRRR(((s#/usr/local/lib/python2.5/zipfile.pyR+s 
.		;							3	A	!	cBs#eZdZddZdZRS(sDClass to create ZIP archives with Python library files and packages.R2c
Cstii|\}}tii|oitii|d}tii|o|od||f}n|}|iodG|GdG|GHn|i|dd!|\}}|io
dG|GHn|i||ti	|}|i
dx|D]}	tii||	}
tii|	\}}tii|
o:tiitii|
do|i|
|qq|djoJ|i|
dd!|\}}|io
dG|GHn|i||qqWq|io
d	G|GHnxti	|D]}	tii||	}
tii|	\}}|djoJ|i|
dd!|\}}|io
dG|GHn|i||qqWne|ddjo
t
d
n|i|dd!|\}}|io
dG|GHn|i||dS(
s,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.
        s__init__.pys%s/%ssAdding package intasiitAddings.pysAdding files from directorys.Files added with writepy() must end with ".py"sAdding fileN(RSRtsplittisdirtjointisfileRwt
_get_codenameRtlistdirtremovetsplitexttwritepyRf(
RXtpathnametbasenametdirRstinitnameRRtdirlistRRtroottext((s#/usr/local/lib/python2.5/zipfile.pyRs^



"










c
	CsD|d}|d}|d}tii|o/ti|iti|ijo
|}ntii|p%ti|iti|ijojddk}|io
dG|GHny|i||dt	Wn |i
j
o}|iGHnX|}n|}tii|d}	|od||	f}	n||	fS(	sReturn (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).
        s.pys.pycs.pyoiNt	Compilingis%s/%s(
RSRRRRt
py_compileRwtcompileRRtPyCompileErrortmsgR(
RXRRtfile_pytfile_pyctfile_pyoRRterrtarchivename((s#/usr/local/lib/python2.5/zipfile.pyRs*


%
%



(R	R
RRR(((s#/usr/local/lib/python2.5/zipfile.pyRsAc

sddk}|id}|djotid}n|p|ddjo|GHtidn|ddjoTt|d	jo|GHtidnt|dd
}|i|i	n%|ddjoOt|d	jo|GHtidnt|dd
}|i
dGHn|ddjot|djo|GHtidnt|dd
}|d	}x|iD]}|id
ot
ii||d	}nt
ii||}t
ii|}t
ii|pt
i|nt|d}|i|i||i	qW|i	n|ddjot|djo|GHtidnfdt|dddt}x.|d	D]"}	||	t
ii|	qW|i	ndS(NisE        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
        iis-ls-cs-es-tiRnsDone testingis./Rpcstii|o|i||tn`tii|oLxIti|D]4}|tii||tii||qMWndS(N(RSRRRRRRR(tzfRtzippathtnm(taddToZip(s#/usr/local/lib/python2.5/zipfile.pyRtsRqR(s-ls-cs-es-t(ttextwraptdedentRRVtargvtexitR:RRRRRt
startswithRSRRtdirnametexiststmakedirsR
RRRR(
targsRtUSAGERtoutRttgtttgtdirRtsrc((Rs#/usr/local/lib/python2.5/zipfile.pytmain:sd	


	

	 t__main__(DRRRSRRVRRRvtImportErrorRt__all__t	ExceptionRRRR[RRR5R4RRR^R_RRRRt
_CD_SIGNATUREt_CD_CREATE_VERSIONt_CD_CREATE_SYSTEMt_CD_EXTRACT_VERSIONt_CD_EXTRACT_SYSTEMt
_CD_FLAG_BITSt_CD_COMPRESS_TYPEt_CD_TIMEt_CD_DATEt_CD_CRCt_CD_COMPRESSED_SIZEt_CD_UNCOMPRESSED_SIZERRRt_CD_DISK_NUMBER_STARTt_CD_INTERNAL_FILE_ATTRIBUTESt_CD_EXTERNAL_FILE_ATTRIBUTESRt
_FH_SIGNATUREt_FH_EXTRACT_VERSIONt_FH_EXTRACT_SYSTEMt_FH_GENERAL_PURPOSE_FLAG_BITSt_FH_COMPRESSION_METHODt_FH_LAST_MOD_TIMEt_FH_LAST_MOD_DATEt_FH_CRCt_FH_COMPRESSED_SIZEt_FH_UNCOMPRESSED_SIZERRRR0RtobjectRRRRR	(((s#/usr/local/lib/python2.5/zipfile.pys<module>s0		"	'cI


Man Man