ACC SHELL

Path : /usr/lib/python/
File Upload :
Current File : //usr/lib/python/tarfile.pyc

oMc@sdZdZdZdZdZdZdZddkZddkZddk	Z	ddk
Z
ddkZddkZddk
Z
ddkZddkZddkZeid	jo
ed
nyddkZddkZWnej
oeZZnXddd
dgZdZdZedZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)d Z*d!Z+d"Z,d#Z-d$Z.d%Z/d&Z0e/Z1ee e!e"e%e&e'e#e$e(e)e*fZ2ee e'e*fZ3e(e)e*fZ4d'd(d)d*d+d,d-d.fZ5he6d/6e6d06e6d*6e7d+6e7d,6e7d)6Z8d1Z9d2Z:d3Z;d4Z<d5Z=d6Z>d7Z?d8Z@dZAd9ZBd:ZCd;ZDd<ZEd=ZFd>ZGd?ZHd&ZId%ZJeiKZLeLejoeiMZLnd@ZNdAZOdBZPd>e1dCZQdDZRdEZSedFZTe9dGfe:dHfe;dIfe<dJfe=dKfe>dLffeBdMffeCdNffeDe?BdOfe?d feDd!ffeEdMffeFdNffeGe@BdOfe@d feGd!ffeHdMffeIdNffeJeABdPfeAdQfeJd!fff
ZUdRZVeiWdSjo
dTZXn
eiYiXZXdeZfdUYZ[dVe[fdWYZ\dXe[fdYYZ]dZe[fd[YZ^d\e[fd]YZ_d^e[fd_YZ`d`fdaYZadbfdcYZbddecfdeYZddfecfdgYZedhecfdiYZfdjecfdkYZgdecfdlYZhdecfdmYZidnfdoYZjdpfdqYZkdrekfdsYZldtekfduYZmdvenfdwYZod$Zpd>ZqdxfdyYZrdzZsetZueiitZtdS({s,Read from and write to tar format archives.
s$Revision: 76386 $s0.9.0s!Lars Gustbel (lars@gustaebel.de)s5$Date: 2009-11-18 16:09:35 -0500 (Wed, 18 Nov 2009) $s;$Id: tarfile.py 76386 2009-11-18 21:09:35Z lars.gustaebel $s3Gustavo Niemeyer, Niels Gustbel, Richard Townsend.iNtmacs'tarfile does not work for platform==mactTarFiletTarInfot
is_tarfiletTarErrortiisustar  tustar00idit0t1t2t3t4t5t6t7tLtKtStxtgtXiiitpathtlinkpathtsizetmtimetuidtgidtunametgnametatimetctimeiii`i@i iiiiii@i iiicCs|| |t|tS(s@Convert a python string to a null-terminated string buffer.
    (tlentNUL(tstlength((s/usr/lib/python2.6/tarfile.pytstnscCs)|id}|djo|S|| S(s?Convert a null-terminated string field to a python string.
    Ri(tfind(R!tp((s/usr/lib/python2.6/tarfile.pytntss
cCs|dtdjoFy tt|pdd}Wqtj
otdqXnJd}x@tt|dD](}|dK}|t||d7}qzW|S(s/Convert a number field to a python number.
    iiRisinvalid headerli(tchrtintR&t
ValueErrortHeaderErrortxrangeRtord(R!tnti((s/usr/lib/python2.6/tarfile.pytntis 
cCsd|jod|djnod|d|ft}n|tjp|d|djotdn|djo&tidtid|d}nd	}x6t|dD]$}t|d
@|}|dL}qWtd|}|S(s/Convert a python number to a number field.
    iiis%0*oisoverflow in number fieldRtltii(R t
GNU_FORMATR)tstructtunpacktpackR+R'(R-tdigitstformatR!R.((s/usr/lib/python2.6/tarfile.pytitns	&"
&cCs|djoy|i|dSWqtj
oqg}xW|D]O}y|i|i|dWq?tj
o|i|idq?Xq?Wdi|SXn|i||SdS(s*Convert a unicode object to a string.
    sutf-8tstricttutf8R1N(tencodetUnicodeEncodeErrortappendtjoin(R!tencodingterrorsRtc((s/usr/lib/python2.6/tarfile.pytutss
cCsxdttid|d tid|dd!}dttid|d tid|dd!}||fS(	sCalculate the checksum for a member's header by summing up all
       characters except for the chksum field which is treated as if
       it was filled with spaces. According to the GNU tar sources,
       some tars (Sun and NeXT) calculate chksum with signed char,
       which will be different if there are chars in the buffer with
       the high bit set. So we calculate two checksums, unsigned and
       signed.
    it148Bit356Biit148bt356b(tsumR3R4(tbuftunsigned_chksumt
signed_chksum((s/usr/lib/python2.6/tarfile.pytcalc_chksumss	77cCs|djodS|djoti||dSd}t||\}}xSt|D]E}|i|}t||jotdn|i|q\W|djoC|i|}t||jotdn|i|ndS(sjCopy length bytes from fileobj src to fileobj dst.
       If length is None, copy the entire content.
    iNiisend of file reachedi@(	tNonetshutiltcopyfileobjtdivmodR+treadRtIOErrortwrite(tsrctdstR"tBUFSIZEtblockst	remaindertbRH((s/usr/lib/python2.6/tarfile.pyRN
s&



R0t-RXtdRAR%trtwR!tttTcCskg}xUtD]M}xD|D]/\}}||@|jo|i|PqqW|idq
Wdi|S(scConvert a file's mode to a string of the form
       -rwxrwxrwx.
       Used by TarFile.list()
    RYR1(tfilemode_tableR=R>(tmodetpermttabletbittchar((s/usr/lib/python2.6/tarfile.pytfilemode>s
	t/cCstii|itidS(Rf(tosRtnormpathtreplacetsep(R((s/usr/lib/python2.6/tarfile.pyt<lambda>NscBseZdZRS(sBase exception.(t__name__t
__module__t__doc__(((s/usr/lib/python2.6/tarfile.pyRRstExtractErrorcBseZdZRS(s%General exception for extract errors.(RlRmRn(((s/usr/lib/python2.6/tarfile.pyRoUst	ReadErrorcBseZdZRS(s%Exception for unreadble tar archives.(RlRmRn(((s/usr/lib/python2.6/tarfile.pyRpXstCompressionErrorcBseZdZRS(s.Exception for unavailable compression methods.(RlRmRn(((s/usr/lib/python2.6/tarfile.pyRq[stStreamErrorcBseZdZRS(s=Exception for unsupported operations on stream-like TarFiles.(RlRmRn(((s/usr/lib/python2.6/tarfile.pyRr^sR*cBseZdZRS(sException for invalid headers.(RlRmRn(((s/usr/lib/python2.6/tarfile.pyR*ast
_LowLevelFilecBs2eZdZdZdZdZdZRS(sLow-level file object. Supports reading and writing.
       It is used instead of a regular file object for streaming
       access.
    cCsfhtid6titiBtiBd6|}ttdo|tiO}nti|||_dS(NR[R\tO_BINARY(	RgtO_RDONLYtO_WRONLYtO_CREATtO_TRUNCthasattrRttopentfd(tselftnameR`((s/usr/lib/python2.6/tarfile.pyt__init__ns
cCsti|idS(N(RgtcloseR{(R|((s/usr/lib/python2.6/tarfile.pyRwscCsti|i|S(N(RgRPR{(R|R((s/usr/lib/python2.6/tarfile.pyRPzscCsti|i|dS(N(RgRRR{(R|R!((s/usr/lib/python2.6/tarfile.pyRR}s(RlRmRnR~RRPRR(((s/usr/lib/python2.6/tarfile.pyRshs
				t_StreamcBseZdZdZdZdZdZdZdZdZ	dZ
d	d
ZddZ
dZd
ZRS(sClass that serves as an adapter between TarFile and
       a stream-like object.  The stream-like object only
       needs to have a read() or write() method and is accessed
       blockwise.  Use of gzip or bzip2 compression is possible.
       A stream-like object could be for example: sys.stdin,
       sys.stdout, a socket, a tape device etc.

       _Stream is intended to be used only internally.
    c
Cst|_|djot||}t|_n|djot|}|i}n|pd|_||_||_	||_
||_d|_d|_
t|_|djozyddk}Wntj
otdnX||_|idd@|_|d	jo|iq1|in|d
jonyddk}Wntj
otdnX|d	jod|_|i|_q|i|_ndS(s$Construct a _Stream object.
        t*R1ltgziNszlib module is not availablelR[tbz2sbz2 module is not available(tTruet_extfileobjRLRstFalset_StreamProxytgetcomptypeR}R`tcomptypetfileobjtbufsizeRHtpostclosedtzlibtImportErrorRqtcrc32tcrct
_init_read_gzt_init_write_gzRtdbuftBZ2Decompressortcmpt
BZ2Compressor(R|R}R`RRRRR((s/usr/lib/python2.6/tarfile.pyR~sD	


							
	


	cCs-t|do|io|indS(NR(RyRR(R|((s/usr/lib/python2.6/tarfile.pyt__del__scCs|iid|ii|ii|iid|_tidtt	i	}|i
d||iido|id |_n|i
|it
dS(s6Initialize for writing with gzip compression.
        i	is<Ls%ss.gziN(RtcompressobjtDEFLATEDt	MAX_WBITSt
DEF_MEM_LEVELRR3R5tlongttimet_Stream__writeR}tendswithR (R|t	timestamp((s/usr/lib/python2.6/tarfile.pyRs
	cCs|idjo#|ii||id@|_n|it|7_|idjo|ii|}n|i|dS(s&Write string s to the stream.
        RlttarN(	RRRRRRRtcompressR(R|R!((s/usr/lib/python2.6/tarfile.pyRRs#cCsa|i|7_xKt|i|ijo1|ii|i|i |i|i|_qWdS(s]Write string s to the stream if a whole new block
           is ready to be written.
        N(RHRRRRR(R|R!((s/usr/lib/python2.6/tarfile.pyt__writes
cCs|iodS|idjo,|idjo|i|ii7_n|idjo|ioz|ii|id|_|idjoJ|iiti	d|i
d@|iiti	d|id@qn|ip|ii
nt|_dS(s[Close the _Stream object. No operation should be
           done on it afterwards.
        NR\RR1Rs<Ll(RR`RRHRtflushRRRR3R5RRRRR(R|((s/usr/lib/python2.6/tarfile.pyRs
 	#+
cCs|ii|ii|_d|_|iddjotdn|iddjotdnt|id}|id|d	@o=t|idd
t|id}|i	|n|d@o<x9t
o-|id}|p
|tjoPqqWn|d@o<x9t
o-|id}|p
|tjoPq0q0Wn|d@o|idnd
S(s:Initialize for reading a gzip compressed fileobj.
        R1issnot a gzip fileissunsupported compression methodiiiiiN(Rt
decompressobjRRRt
_Stream__readRpRqR,RPRR (R|tflagtxlenR!((s/usr/lib/python2.6/tarfile.pyRs2	
,cCs|iS(s3Return the stream's file pointer position.
        (R(R|((s/usr/lib/python2.6/tarfile.pyttellsicCs~||idjoWt||i|i\}}x$t|D]}|i|iq@W|i|n
td|iS(sXSet the stream's file pointer to pos. Negative seeking
           is forbidden.
        is seeking backwards is not allowed(RRORR+RPRr(R|RRVRWR.((s/usr/lib/python2.6/tarfile.pytseeks
cCs|djoSg}x7to/|i|i}|pPn|i|qWdi|}n|i|}|it|7_|S(sReturn the next size number of bytes from the stream.
           If size is not defined, return all bytes of the stream
           up to EOF.
        R1N(RLRt_readRR=R>RR(R|RR]RH((s/usr/lib/python2.6/tarfile.pyRP*s
cCs|idjo|i|St|i}|ig}x||jow|i|i}|pPny|ii|}Wntj
otdnX|i	||t|7}q<Wdi
|}|||_|| S(s+Return size bytes from the stream.
        Rsinvalid compressed dataR1(RRRRRRt
decompressRQRpR=R>(R|RRAR]RH((s/usr/lib/python2.6/tarfile.pyR<s$


cCst|i}|ig}xP||joB|ii|i}|pPn|i||t|7}qWdi|}|||_|| S(ssReturn size bytes from stream. If internal buffer is empty,
           read another block from the stream.
        R1(RRHRRPRR=R>(R|RRAR]RH((s/usr/lib/python2.6/tarfile.pyt__readRs


N(RlRmRnR~RRRRRRRRRRLRPRR(((s/usr/lib/python2.6/tarfile.pyRs		.		
	
					
	RcBs2eZdZdZdZdZdZRS(ssSmall proxy class that enables transparent compression
       detection for the Stream interface (mode 'r|*').
    cCs"||_|iit|_dS(N(RRPt	BLOCKSIZERH(R|R((s/usr/lib/python2.6/tarfile.pyR~hs	cCs|ii|_|iS(N(RRPRH(R|R((s/usr/lib/python2.6/tarfile.pyRPlscCs4|iidodS|iidodSdS(NsRtBZh91RR(RHt
startswith(R|((s/usr/lib/python2.6/tarfile.pyRps
cCs|iidS(N(RR(R|((s/usr/lib/python2.6/tarfile.pyRws(RlRmRnR~RPRR(((s/usr/lib/python2.6/tarfile.pyRcs
			t	_BZ2ProxycBsSeZdZd
ZdZdZdZdZdZdZ	d	Z
RS(sSmall proxy class that enables external file object
       support for "r:bz2" and "w:bz2" modes. This is actually
       a workaround for a limitation in bz2 module's BZ2File
       class which (unlike gzip.GzipFile) has no support for
       a file object argument.
    iicCs8||_||_t|idd|_|idS(NR}(RR`tgetattrRLR}tinit(R|RR`((s/usr/lib/python2.6/tarfile.pyR~s		cCsdddk}d|_|idjo,|i|_|iidd|_n|i|_dS(NiiR[R1(	RRR`Rtbz2objRRRHR(R|R((s/usr/lib/python2.6/tarfile.pyRs	
cCs|ig}t|i}x}||joo|ii|i}|pPny|ii|}Wntj
oPnX|i||t|7}qWdi	||_|i| }|i||_|i
t|7_
|S(NR1(RHRRRPt	blocksizeRRtEOFErrorR=R>R(R|RRXRtrawtdataRH((s/usr/lib/python2.6/tarfile.pyRPs$


cCs6||ijo|in|i||idS(N(RRRP(R|R((s/usr/lib/python2.6/tarfile.pyRscCs|iS(N(R(R|((s/usr/lib/python2.6/tarfile.pyRscCs;|it|7_|ii|}|ii|dS(N(RRRRRRR(R|RR((s/usr/lib/python2.6/tarfile.pyRRscCs7|idjo#|ii}|ii|ndS(NR\(R`RRRRR(R|R((s/usr/lib/python2.6/tarfile.pyRsi@(RlRmRnRR~RRPRRRRR(((s/usr/lib/python2.6/tarfile.pyR{s		
				t_FileInFilecBsSeZdZddZdZdZddZdZdZ	dZ
RS(	sA thin wrapper around an existing file object that
       provides a part of its data as an individual file
       object.
    cCs1||_||_||_||_d|_dS(Ni(RtoffsetRtsparsetposition(R|RRRR((s/usr/lib/python2.6/tarfile.pyR~s
				cCs|iS(s*Return the current file position.
        (R(R|((s/usr/lib/python2.6/tarfile.pyRscCs
||_dS(s(Seek to a position in the file.
        N(R(R|R((s/usr/lib/python2.6/tarfile.pyRscCsi|djo|i|i}nt||i|i}|idjo|i|S|i|SdS(s!Read data from the file.
        N(RLRRtminRt
readnormalt
readsparse(R|R((s/usr/lib/python2.6/tarfile.pyRPs
cCs9|ii|i|i|i|7_|ii|S(s*Read operation for regular files.
        (RRRRRP(R|R((s/usr/lib/python2.6/tarfile.pyRscCs`g}xJ|djo<|i|}|pPn|t|8}|i|q	Wdi|S(s)Read operation for sparse files.
        iR1(treadsparsesectionRR=R>(R|RRRH((s/usr/lib/python2.6/tarfile.pyRs
cCs|ii|i}|djodSt||i|i|i}t|toN|i	|i|i}|i
i|i||i|7_|i
i|S|i|7_t
|SdS(s0Read a single section of a sparse file.
        R1N(RR$RRLRRRt
isinstancet_datatrealposRRRPR (R|RtsectionR((s/usr/lib/python2.6/tarfile.pyRs
 N(RlRmRnRLR~RRRPRRR(((s/usr/lib/python2.6/tarfile.pyRs		
		tExFileObjectcBsheZdZdZdZddZddZdZdZ	e
idZd	Z
d
ZRS(saFile-like object for reading an archive member.
       Is returned by TarFile.extractfile().
    icCsmt|i|i|it|dd|_|i|_d|_t|_	|i|_d|_
d|_dS(NRR[iR1(RRtoffset_dataRRRLR}R`RRRtbuffer(R|ttarfilettarinfo((s/usr/lib/python2.6/tarfile.pyR~s				cCs|iotdnd}|ioD|djo|i}d|_qn|i| }|i||_n|djo||ii7}n!||ii|t|7}|it|7_|S(s~Read at most size bytes from the file. If size is not
           present or None, read all data until EOF is reached.
        sI/O operation on closed fileR1N(RR)RRLRRPRR(R|RRH((s/usr/lib/python2.6/tarfile.pyRPs


	


 icCs9|iotdnd|ijo|iidd}n|ig}xto|ii|i}|i||p
d|joMdi	||_|iidd}|djot
|i}nPqSqSW|djot||}n|i| }|i||_|it
|7_|S(sRead one entire line from the file. If size is present
           and non-negative, return a string with at most that
           size, which may be an incomplete line.
        sI/O operation on closed files
iR1ii(
RR)RR$RRRPRR=R>RRR(R|RRtbuffersRH((s/usr/lib/python2.6/tarfile.pytreadline6s*





cCs>g}x1to)|i}|pPn|i|q	W|S(s0Return a list with all remaining lines.
        (RRR=(R|tresulttline((s/usr/lib/python2.6/tarfile.pyt	readlinesUscCs!|iotdn|iS(s*Return the current file position.
        sI/O operation on closed file(RR)R(R|((s/usr/lib/python2.6/tarfile.pyR_s
cCs|iotdn|tijo"tt|d|i|_n|tijoJ|djot|i|d|_qt|i||i|_nF|ti	jo)tt|i||id|_n
tdd|_
|ii|idS(s(Seek to a position in the file.
        sI/O operation on closed fileisInvalid argumentR1N(
RR)RgtSEEK_SETRtmaxRRtSEEK_CURtSEEK_ENDRRR(R|Rtwhence((s/usr/lib/python2.6/tarfile.pyRgs
"
 )	cCs
t|_dS(sClose the file object.
        N(RR(R|((s/usr/lib/python2.6/tarfile.pyR|sccs0x)to!|i}|pPn|VqWdS(s/Get an iterator over the file's lines.
        N(RR(R|R((s/usr/lib/python2.6/tarfile.pyt__iter__sN(RlRmRnRR~RLRPRRRRgRRRR(((s/usr/lib/python2.6/tarfile.pyRs	
	
		cBseZdZddZdZdZeeeZdZdZ	eee	Z
dZdZe
ed	d
ZdZdZd
ZedZdZedZedZedZeedZedZedZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'd Z(d!Z)d"Z*d#Z+d$Z,d%Z-d&Z.RS('sInformational class which holds the details about an
       archive member given by a tar header block.
       TarInfo objects are returned by TarFile.getmember(),
       TarFile.getmembers() and TarFile.gettarinfo() and are
       usually created internally.
    R1cCs||_d|_d|_d|_d|_d|_d|_t|_d|_	d|_
d|_d|_d|_
d|_d|_h|_dS(sXConstruct a TarInfo object. name is the optional name
           of the member.
        iiR1trootN(R}R`RRRRtchksumtREGTYPEttypetlinknameRRtdevmajortdevminorRRtpax_headers(R|R}((s/usr/lib/python2.6/tarfile.pyR~s 															cCs|iS(N(R}(R|((s/usr/lib/python2.6/tarfile.pyt_getpathscCs
||_dS(N(R}(R|R}((s/usr/lib/python2.6/tarfile.pyt_setpathscCs|iS(N(R(R|((s/usr/lib/python2.6/tarfile.pyt_getlinkpathscCs
||_dS(N(R(R|R((s/usr/lib/python2.6/tarfile.pyt_setlinkpathscCs d|ii|it|fS(Ns<%s %r at %#x>(t	__class__RlR}tid(R|((s/usr/lib/python2.6/tarfile.pyt__repr__scCs-h
t|id6|id@d6|id6|id6|id6|id6|id6|id	6|i	ot|i	nd
d6|i
d6|id
6|id6|i
d6}|d	tjo)|dido|dcd7<nxCdD];}t||tjo||i||||<qqW|S(s9Return the TarInfo's attributes as a dictionary.
        R}iR`RRRRRRR1RRRRRRf(snameslinknamesunamesgname(RhR}R`RRRRRRRRRRRtDIRTYPERtunicodeR;(R|R?R@tinfotkey((s/usr/lib/python2.6/tarfile.pytget_infos*





!



&"R9cCsy|i||}|tjo|i|S|tjo|i|S|tjo|i|||StddS(s<Return a tar header as a string of 512 byte blocks.
        sinvalid formatN(RtUSTAR_FORMATtcreate_ustar_headerR2tcreate_gnu_headert
PAX_FORMATtcreate_pax_headerR)(R|R7R?R@R((s/usr/lib/python2.6/tarfile.pyttobufs


cCs}t|d<t|dtjotdnt|dtjo%|i|d\|d<|d<n|i|tS(s3Return the object as a ustar header block.
        tmagicRslinkname is too longR}tprefix(tPOSIX_MAGICRtLENGTH_LINKR)tLENGTH_NAMEt_posix_split_namet_create_headerR(R|R((s/usr/lib/python2.6/tarfile.pyRs
%cCst|d<d}t|dtjo||i|dt7}nt|dtjo||i|dt7}n||i|tS(s:Return the object as a GNU header block sequence.
        RR1RR}(	t	GNU_MAGICRRt_create_gnu_long_headertGNUTYPE_LONGLINKRtGNUTYPE_LONGNAMERR2(R|RRH((s/usr/lib/python2.6/tarfile.pyRs
cCst|d<|ii}xddtfddtfddfD]\}}}||joq>n||i||}y|id	Wn tj
o|||<q>nXt|||jo|||<q>q>WxddddfD]\}}	||jod||<qn||}d|jod|	djnpt	|t
ot|||<d||<qqW|o|i|}
nd}
|
|i
|tS(sReturn the object as a ustar header block. If it cannot be
           represented this way, prepend a pax extended header sequence
           with supplement information.
        RR}RRRRi RtasciiRiRRiRiiR1(sunamesunamei (sgnamesgnamei (suidi(sgidi(ssizei(smtimei(RRtcopyRRtdecodeR;R<RRtfloatRt_create_pax_generic_headerRR(R|RR?R@RR}thnameR"tvalR6RH((s/usr/lib/python2.6/tarfile.pyRs:






7cCs|i|dtS(sAReturn the object as a pax global header block sequence.
        R(RtXGLTYPE(tclsR((s/usr/lib/python2.6/tarfile.pytcreate_pax_global_header6scCs|td }x'|o|ddjo|d }qW|t|}|d }|pt|tjotdn||fS(sUSplit a name longer than 100 chars into a prefix
           and a name part.
        iiRfsname is too long(t
LENGTH_PREFIXRRR)(R|R}R((s/usr/lib/python2.6/tarfile.pyR<s
cCst|idddt|iddd@d|t|iddd|t|id	dd|t|id
dd|t|iddd|d
|idtt|idddt|idtdt|idddt|idddt|iddd|t|iddd|t|idddg}tidtdi|}t	|td}|d d||d}|S(sReturn a header block. info is a dictionary with file
           information, format must be one of the *_FORMAT constants.
        R}R1idR`iiiRRRiRs        RRRRRi RRRRis%dsis%06oi(
R#tgetR8RRR3R5RR>RK(RR7tpartsRHR((s/usr/lib/python2.6/tarfile.pyRKs&cCsBtt|t\}}|djo|t|t7}n|S(sdReturn the string payload filled with zero bytes
           up to the next 512 byte border.
        i(RORRR (tpayloadRVRW((s/usr/lib/python2.6/tarfile.pyt_create_payloadgs
cCs[|t7}h}d|d<||d<t||d<t|d<|i|t|i|S(sTReturn a GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequence
           for name.
        s
././@LongLinkR}RRR(R RRRRR	(RR}RR((s/usr/lib/python2.6/tarfile.pyRqs



c
Csg}x|iD]\}}|id}|id}t|t|d}d}}x:to2|tt|}||joPn|}qdW|id|||fqWdi|}h}	d|	d<||	d<t||	d	<t|	d
<|i|	t	|i
|S(sReturn a POSIX.1-2001 extended or global header sequence
           that contains a list of keyword, value pairs. The values
           must be unicode objects.
        R:iis	%d %s=%s
R1s././@PaxHeaderR}RRR(t	iteritemsR;RRtstrR=R>RRRR	(
RRRtrecordstkeywordtvalueR0R-R%R((s/usr/lib/python2.6/tarfile.pyRs,





cCs8t|tjotdn|ittjotdnt|dd!}|t|jotdn|}||_t|dd!|_	t|dd!|_
t|dd	!|_t|d	d
!|_t|d
d!|_
t|dd!|_||_|dd!|_t|dd
!|_t|dd!|_t|dd!|_t|dd!|_t|dd!|_t|dd!}|itjo |i	ido
t|_n|io|i	id|_	n|o(|itjo|d|i	|_	n|S(sBConstruct a TarInfo object from a 512 byte string buffer.
        struncated headersempty headeriisbad checksumiidiliti|iiii	i)iIiQiYiRf(RRR*tcountR R/RKRHR&R}R`RRRRRRRRRRRtAREGTYPERRtisdirtrstript	GNU_TYPES(RRHRtobjR((s/usr/lib/python2.6/tarfile.pytfrombufs<			#

cCsP|iit}|pdS|i|}|iit|_|i|S(sOReturn the next TarInfo object from TarFile object
           tarfile.
        N(RRPRRRRt_proc_member(RRRHR((s/usr/lib/python2.6/tarfile.pytfromtarfilescCsz|ittfjo|i|S|itjo|i|S|itttfjo|i	|S|i
|SdS(sYChoose the right processing method depending on
           the type and call it.
        N(RRRt
_proc_gnulongtGNUTYPE_SPARSEt_proc_sparsetXHDTYPERtSOLARIS_XHDTYPEt	_proc_paxt
_proc_builtin(R|R((s/usr/lib/python2.6/tarfile.pyRscCs{|ii|_|i}|ip|itjo||i|i7}n||_|i	|i
|i|i|S(sfProcess a builtin type or an unknown type which
           will be treated as a regular file.
        (
RRRtisregRtSUPPORTED_TYPESt_blockRRt_apply_pax_infoRR?R@(R|RR((s/usr/lib/python2.6/tarfile.pyRs		cCs|ii|i|i}|i|}|djotdn|i|_|it	jot
||_n$|itjot
||_
n|S(sSProcess the blocks that hold a GNU longname
           or longlink member.
        smissing subsequent headerN(RRPR!RRRLR*RRRR&R}RR(R|RRHtnext((s/usr/lib/python2.6/tarfile.pyRs
cCs|i}t}d}d}d}xtdD]}y6t|||d!}t||d|d!}	Wntj
oPnX||jo|it|||n|it||	|||	7}||	}|d7}q1Wt|d}
t|dd!}x|
d	jo|i	i
t}d
}xtdD]}y6t|||d!}t||d|d!}	Wntj
oPnX||jo|it|||n|it||	|||	7}||	}|d7}qBWt|d}
qW||jo|it|||n||_|i	i
|_|i|i|i|_||_|S(
s8Process a GNU sparse header plus extra headers.
        iliiiiiiiiii(RHt_ringbufferR+R/R)R=t_holeRR,RRPRRRRR!RR(R|RRHtspRtlastposRR.Rtnumbytest
isextendedtorigsize((s/usr/lib/python2.6/tarfile.pyRsZ		









		cCs|ii|i|i}|itjo
|i}n|ii}ti	dti
}d}xto|i||}|pPn|i
\}}t|}||idd|id|d!}	|id}|	id}	|	||<||7}qhW|i|}
|ittfjo|
djotdn|
i||i|i|i|
_d|joM|
i}|
ip|
itjo||
i|
i7}n||_qn|
S(	sVProcess an extended or global header as described in
           POSIX.1-2001.
        s(\d+) ([^=]+)=iiiR:smissing subsequent headerRN(RRPR!RRRRRtretcompiletURtmatchtgroupsR(tendtstartRRRRRLR*R"R?R@RRRR (R|RRHRtregexRR.R"R
RR#R((s/usr/lib/python2.6/tarfile.pyRPs<
+


	cCsx|iD]\}}|tjoq
n|djo|id}n|tjo4yt||}Wqtj
o
d}qXnt|||}t|||q
W|i|_dS(soReplace fields with supplemental information from a previous
           pax extended or global header.
        RRfiN(	R
t
PAX_FIELDSRtPAX_NUMBER_FIELDSR)RBtsetattrRR(R|RR?R@R
R((s/usr/lib/python2.6/tarfile.pyR"s



cCs2t|t\}}|o|d7}n|tS(s_Round up a byte count by BLOCKSIZE and return it,
           e.g. _block(834) => 1024.
        i(ROR(R|RRVRW((s/usr/lib/python2.6/tarfile.pyR!scCs
|itjS(N(Rt
REGULAR_TYPES(R|((s/usr/lib/python2.6/tarfile.pyRscCs
|iS(N(R(R|((s/usr/lib/python2.6/tarfile.pytisfilescCs
|itjS(N(RR(R|((s/usr/lib/python2.6/tarfile.pyRscCs
|itjS(N(RtSYMTYPE(R|((s/usr/lib/python2.6/tarfile.pytissymscCs
|itjS(N(RtLNKTYPE(R|((s/usr/lib/python2.6/tarfile.pytislnkscCs
|itjS(N(RtCHRTYPE(R|((s/usr/lib/python2.6/tarfile.pytischrscCs
|itjS(N(RtBLKTYPE(R|((s/usr/lib/python2.6/tarfile.pytisblkscCs
|itjS(N(RtFIFOTYPE(R|((s/usr/lib/python2.6/tarfile.pytisfifoscCs
|itjS(N(RR(R|((s/usr/lib/python2.6/tarfile.pytissparsescCs|itttfjS(N(RR<R>R@(R|((s/usr/lib/python2.6/tarfile.pytisdevs(/RlRmRnR~RRtpropertyRRRRRRtDEFAULT_FORMATtENCODINGRRRRtclassmethodRRtstaticmethodRR	RRRRRRRRRRR"R!RR7RR9R;R=R?RARBRC(((s/usr/lib/python2.6/tarfile.pyRsP							
		3	
,	
			8	:												c
Bs'eZdZdZeZeZdZeZ	e
Zd.Z
eZeZd.dd.d.d.d.d.d.d.d.d.d.dZdZdZeeeZed.dd.edZedd.dZedd.dd	Zedd.dd
Zhdd6d
d6dd6ZdZdZdZ dZ!d.d.d.dZ"e#dZ$d.e#d.dZ%d.dZ&dd.dZ'ddZ(dZ)dZ*dZ+d Z,d!Z-d"Z.d#Z/d$Z0d%Z1d&Z2d'Z3d(Z4d.d)Z5d*Z6d.d+Z7d,Z8d-Z9RS(/s=The TarFile Class provides an interface to tar archives.
    iR[c
Cst|djp
|djotdn||_hdd6dd6dd	6||_|pY|idjo*tii|od	|_d|_nt||i}t|_	nT|djot|d
o
|i}nt|do|i|_nt
|_	|otii|nd|_||_|dj	o
||_n|dj	o
||_n|dj	o
||_n|dj	o
||_n|dj	o
||_n|	dj	o
|	|_n$|djo
d|_n
d
|_|
dj	o|itjo
|
|_n
h|_|dj	o
||_n|dj	o
||_nt|_g|_t|_|ii|_h|_y|idjod|_ |i!|_ n|idjo\d|_ xPt
oD|i!djo-|idjo|ii"t#dnPqqWn|idjo[t
|_|ioD|ii$|ii%}
|ii&|
|it|
7_qnWn.|i	p|ii'nt
|_nXdS(sOpen an (uncompressed) tar archive `name'. `mode' is either 'r' to
           read from an existing archive, 'a' to append data to an existing
           file or 'w' to create a new file overwriting an existing one. `mode'
           defaults to 'r'.
           If `fileobj' is given, it is used for reading or writing data. If it
           can be determined, `mode' is overridden by `fileobj's mode.
           `fileobj' is not closed, when TarFile is closed.
        iRsmode must be 'r', 'a' or 'w'trbR[sr+btatwbR\R}R`sutf-8R9itawN((RR)R`t_modeRgRtexistst	bltn_openRRRLRyR}RtabspathRR7Rtdereferencetignore_zerosR?R@RRtdebugt
errorlevelRtmemberst_loadedRRtinodestfirstmemberR#RRRRRRR(R|R}R`RR7RRQRRR?R@RRSRTRH((s/usr/lib/python2.6/tarfile.pyR~s 	"$	


	#	













	
	



							
!
	cCs
|itjS(N(R7R(R|((s/usr/lib/python2.6/tarfile.pyt	_getposix<scCs@ddk}|idtd|o
t|_n
t|_dS(Nis use the format attribute insteadi(twarningstwarntDeprecationWarningRR7R2(R|RRZ((s/usr/lib/python2.6/tarfile.pyt	_setposix>s
c	Ks,|o|otdn|djox|iD]}t||i|}|dj	o|i}ny||d||SWq7ttfj
o*}	|dj	o|i|q7q7q7Xq7WtdnCd|jo|idd\}
}|
pd}
|pd}||ijot||i|}ntd||||
||Sd	|jo|id	d\}
}|
pd}
|pd}|
d
jotdn|||
t	||
||||}t
|_|S|djo|i||||Std
dS(s|Open a tar archive for reading, writing or appending. Return
           an appropriate TarFile class.

           mode:
           'r' or 'r:*' open for reading with transparent compression
           'r:'         open for reading exclusively uncompressed
           'r:gz'       open for reading with gzip compression
           'r:bz2'      open for reading with bzip2 compression
           'a' or 'a:'  open for appending, creating the file if necessary
           'w' or 'w:'  open for writing without compression
           'w:gz'       open for writing with gzip compression
           'w:bz2'      open for writing with bzip2 compression

           'r|*'        open a stream of tar blocks with transparent compression
           'r|'         open an uncompressed stream of tar blocks for reading
           'r|gz'       open a gzip compressed stream of tar blocks
           'r|bz2'      open a bzip2 compressed stream of tar blocks
           'w|'         open an uncompressed stream for writing
           'w|gz'       open a gzip compressed stream for writing
           'w|bz2'      open a bzip2 compressed stream for writing
        snothing to openR[sr:*s%file could not be opened successfullyt:iRsunknown compression type %rt|trwsmode must be 'r' or 'w'RLsundiscernible modeN(R[sr:*(
R)t	OPEN_METHRRLRRpRqRtsplitRRRttaropen(RR}R`RRtkwargsRtfunct	saved_posteReR]((s/usr/lib/python2.6/tarfile.pyRzSsJ










			
cKsCt|djp
|djotdn|||||S(sCOpen uncompressed tar archive name for reading or writing.
        iRsmode must be 'r', 'a' or 'w'(RR)(RR}R`RRd((s/usr/lib/python2.6/tarfile.pyRcs i	cKst|djp
|djotdnyddk}|iWn%ttfj
otdnX|djot||d}ny.|i	|||i|||||}Wnt
j
otdnXt|_
|S(	skOpen gzip compressed tar archive name for reading or writing.
           Appending is not allowed.
        iR`smode must be 'r' or 'w'iNsgzip module is not availableRXsnot a gzip file(RR)tgziptGzipFileRtAttributeErrorRqRLRORcRQRpRR(RR}R`Rt
compresslevelRdRhR]((s/usr/lib/python2.6/tarfile.pytgzopens" 

	cKst|djp
|djotdnyddk}Wntj
otdnX|dj	ot||}n|i||d|}y|i||||}Wnt	j
ot
dnXt|_|S(	slOpen bzip2 compressed tar archive name for reading or writing.
           Appending is not allowed.
        iR`smode must be 'r' or 'w'.iNsbz2 module is not availableRksnot a bzip2 file(
RR)RRRqRLRtBZ2FileRcRQRpRR(RR}R`RRkRdRR]((s/usr/lib/python2.6/tarfile.pytbz2opens 
	RcRRlRRnRcCs|iodS|idjop|iittd|itd7_t|it\}}|djo|iitt|qn|i	p|ii
nt|_dS(slClose the TarFile. In write-mode, two finishing zero blocks are
           appended to the archive.
        NRLii(RR`RRRR RRROt
RECORDSIZERRR(R|RVRW((s/usr/lib/python2.6/tarfile.pyRs

 
cCs4|i|}|djotd|n|S(sReturn a TarInfo object for member `name'. If `name' can not be
           found in the archive, KeyError is raised. If a member occurs more
           than once in the archive, its last occurrence is assumed to be the
           most up-to-date version.
        sfilename %r not foundN(t
_getmemberRLtKeyError(R|R}R((s/usr/lib/python2.6/tarfile.pyt	getmembers
cCs)|i|ip|in|iS(sReturn the members of the archive as a list of TarInfo objects. The
           list has the same order as the members in the archive.
        (t_checkRVt_loadRU(R|((s/usr/lib/python2.6/tarfile.pyt
getmemberss

cCs(g}|iD]}||iq~S(sReturn the members of the archive as a list of their names. It has
           the same order as the list returned by getmembers().
        (RuR}(R|t_[1]R((s/usr/lib/python2.6/tarfile.pytgetnames
sc
Cs|id|d
j	o
|i}n|d
jo
|}nt|}tii|\}}x#|dd!djo|d}qeW|i}||_|d
joAt	tdo|i
oti|}qti|}nti
|i}d}|i}ti|o|i|if}	|i
oK|idjo;|	|ijo+||i|	jot}
|i|	}qBt}
|	do||i|	<qBnti|o
t}
n|ti|o
t}
nbti|ot}
ti|}n9ti|o
t}
nti |o
t!}
nd
S||_||_"|i#|_$|i%|_&ti|o|i'|_(n
d|_(|i)|_*|
|_+||_,t-o7yt-i.|i$d|_/Wqt0j
oqXnt1o7yt1i2|i&d|_3Wq/t0j
oq/Xn|
tt!fjoRt	tdo>t	td	o.ti4|i5|_6ti7|i5|_8qn|S(sOCreate a TarInfo object for either the file `name' or the file
           object `fileobj' (using os.fstat on its file descriptor). You can
           modify some of the TarInfo's attributes before you add it using
           addfile(). If given, `arcname' specifies an alternative name for the
           file in the archive.
        RLiiRftlstatR1ltmajortminorN(9RsRLR}RhRgRt
splitdriveRRRyRQRxtstattfstattfilenotst_modetS_ISREGtst_inotst_devtst_nlinkRWR:RtS_ISDIRRtS_ISFIFOR@tS_ISLNKR8treadlinktS_ISCHRR<tS_ISBLKR>R`tst_uidRtst_gidRtst_sizeRtst_mtimeRRRtpwdtgetpwuidRRqtgrptgetgrgidRRytst_rdevRRzR(R|R}tarcnameRtdrvRtstatresRtstmdtinodeR((s/usr/lib/python2.6/tarfile.pyt
gettarinfos




	
	$



							 cCs|ix
|D]}|ot|iGd|ip|i|ip|ifG|ip
|iodd|i	|i
fGnd|iGdti
|id Gn|i|iodndG|o<|iod	G|iGn|iod
G|iGqnHqWdS(sPrint a table of contents to sys.stdout. If `verbose' is False, only
           the names of the members are printed. If it is True, an `ls -l'-like
           output is produced.
        s%s/%ss%10ss%d,%ds%10ds%d-%02d-%02d %02d:%02d:%02diRfR1s->slink toN(RsReR`RRRRR=R?RRRRt	localtimeRR}RR9RR;(R|tverboseR((s/usr/lib/python2.6/tarfile.pytlistss(



cCs|id|djo
|}n|dj	o&||o|idd|dS|idj	o5tii||ijo|idd|dS|djof|oZ|djo
d}nx@ti|D]+}|i|tii	||||qWndS|id||i
||}|djo|idd	|dS|io-t|d
}|i
|||in|ioj|i
||oRxOti|D]:}|itii	||tii	||||qWqn|i
|dS(sAdd the file `name' to the archive. `name' may be any type of file
           (directory, fifo, symbolic link, etc.). If given, `arcname'
           specifies an alternative name for the file in the archive.
           Directories are added recursively by default. This can be avoided by
           setting `recursive' to False. `exclude' is a function that should
           return True for each filename to be excluded.
        RListarfile: Excluded %rNstarfile: Skipped %rt.R1istarfile: Unsupported type %rRI(RsRLt_dbgR}RgRRPtlistdirtaddR>RRROtaddfileRR(R|R}Rt	recursivetexcludetfR((s/usr/lib/python2.6/tarfile.pyRsB


,


-



@cCs|idti|}|i|i|i|i}|ii||it	|7_|dj	oxt||i|it
|it\}}|djo&|iitt||d7}n|i|t7_n|ii|dS(s]Add the TarInfo object `tarinfo' to the archive. If `fileobj' is
           given, tarinfo.size bytes are read from it and added to the archive.
           You can create TarInfo objects using gettarinfo().
           On Windows platforms, `fileobj' should always be opened with mode
           'rb' to avoid irritation about the file size.
        RLiiN(RsRRR7R?R@RRRRRRLRNRRORR RUR=(R|RRRHRVRW((s/usr/lib/python2.6/tarfile.pyRs


Rc	Cs;g}|djo
|}nxT|D]L}|io)|i|ti|}d|_n|i||q$W|idtid|i	x|D]}t
ii||i
}y4|i|||i|||i||Wqtj
o4}|idjoq3|idd|qXqWdS(sMExtract all members from the archive to the current working
           directory and set owner, modification time and permissions on
           directories afterwards. `path' specifies a different directory
           to extract to. `members' is optional and must be a subset of the
           list returned by getmembers().
        iRR}istarfile: %sN(RLRR=RR`textracttsorttoperatort
attrgettertreverseRgRR>R}tchowntutimetchmodRoRTR(R|RRUtdirectoriesRtdirpathRg((s/usr/lib/python2.6/tarfile.pyt
extractalls.





R1cCsE|idt|to|i|}n|}|iotii||i|_	ny&|i
|tii||iWntj
ok}|i
djoqA|idjo|idd|iqA|idd|i|ifnAtj
o4}|i
djoqA|idd|nXdS(s#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 TarInfo object. You can
           specify a different directory using `path'.
        R[iistarfile: %sstarfile: %s %rN(RsRt
basestringRrR;RgRR>Rt_link_targett_extract_memberR}tEnvironmentErrorRTtfilenameRLRtstrerrorRo(R|tmemberRRRg((s/usr/lib/python2.6/tarfile.pyRs$

&$cCs|idt|to|i|}n|}|io|i||S|itjo|i||S|ip
|i	oCt|i
totdq|i
|i|i|SndSdS(sExtract a member from the archive as a file object. `member' may be
           a filename or a TarInfo object. If `member' is a regular file, a
           file-like object is returned. If `member' is a link, a file-like
           object is constructed from the link's target. If `member' is none of
           the above, None is returned.
           The file-like object is read-only and provides the following
           methods: read(), readline(), readlines(), seek() and tell()
        R[s'cannot extract (sym)link as file objectN(RsRRRrRt
fileobjectRR R;R9RRRrtextractfileRpRRL(R|RR((s/usr/lib/python2.6/tarfile.pyR)s	

cCs|ddjo|d }ntii|}tii|}|o%tii|oti|n|ip
|io$|idd|i	|i
fn|id|i	|io|i||n|i
o|i||n|io|i||n|ip
|io|i||nc|ip
|io|i||n5|itjo|i||n|i|||i|||ip$|i|||i||ndS(s\Extract the TarInfo object tarinfo to a physical
           file called targetpath.
        iRfis%s -> %sN(RgRRhtdirnameRNtmakedirsR;R9RR}RRtmakefileRtmakedirRAtmakefifoR=R?tmakedevtmakelinkRR tmakeunknownRRR(R|Rt
targetpatht	upperdirs((s/usr/lib/python2.6/tarfile.pyRPs4$



cCsJyti|dWn/tj
o#}|itijoqFnXdS(s,Make a directory called targetpath.
        iN(RgtmkdirRterrnotEEXIST(R|RRRg((s/usr/lib/python2.6/tarfile.pyRs
cCsC|i|}t|d}t|||i|idS(s'Make a file called targetpath.
        RKN(RRORNR(R|RRtsourcettarget((s/usr/lib/python2.6/tarfile.pyRs


cCs+|i|||idd|idS(sYMake a file from a TarInfo object with an unknown type
           at targetpath.
        is9tarfile: Unknown file type %r, extracted as regular file.N(RRR(R|RR((s/usr/lib/python2.6/tarfile.pyRscCs1ttdoti|n
tddS(s'Make a fifo called targetpath.
        tmkfifosfifo not supported by systemN(RyRgRRo(R|RR((s/usr/lib/python2.6/tarfile.pyRscCsttdpttdotdn|i}|io|tiO}n|tiO}ti||ti	|i
|idS(s<Make a character or block device called targetpath.
        tmknodRs'special devices not supported by systemN(RyRgRoR`R?R|tS_IFBLKtS_IFCHRRRRR(R|RRR`((s/usr/lib/python2.6/tarfile.pyRs"	

cCs!|i}y8|ioti||nti|i|Wntj
o|io4tiitii	|i
|}t|}ny|i|i
||Wqttfj
oS}tii|}yti||Wqtj
o}tdqXqXnXdS(sMake a (symbolic) link called targetpath. If it cannot be created
          (platform limitation), we try to make a copy of the referenced file
          instead of a link.
        slink could not be createdN(RR9RgtsymlinktlinkRRjRR>RR}RhRRrRRqRMtcopy2RQ(R|RRRRg((s/usr/lib/python2.6/tarfile.pyRs$	

	c
Cstottdortidjo_yti|id}WnOtj
oCyti|i	d}Wqtj
oti
}qXnXyti|id}WnOtj
oCyti
|id}Wqtj
oti}qXnXy_|io'ttdoti|||n(tidjoti|||nWqtj
o}tdqXndS(s6Set owner of targetpath according to tarinfo.
        tgeteuidiitlchowntos2emxscould not change ownerN(RRyRgRRtgetgrnamRRqRRtgetgidtgetpwnamRRRtgetuidR9RtsystplatformRRRo(R|RRRtuRg((s/usr/lib/python2.6/tarfile.pyRs,*cCsSttdo?yti||iWqOtj
o}tdqOXndS(sASet file permissions of targetpath according to tarinfo.
        Rscould not change modeN(RyRgRR`RRo(R|RRRg((s/usr/lib/python2.6/tarfile.pyRs
cCs]ttdpdSy ti||i|ifWn!tj
o}tdnXdS(sBSet modification time of targetpath according to tarinfo.
        RNs"could not change modification time(RyRgRRRRo(R|RRRg((s/usr/lib/python2.6/tarfile.pyRs cCs|id|idj	o|i}d|_|S|ii|ixtoy8|ii|}|djodS|i	i
|Wn|tj
op}|io3|i
dd|i|f|it7_qJq|idjott|ndSnXPqJW|S(sReturn the next member of the archive as a TarInfo object, when
           TarFile is opened for reading. Return None if there is no more
           available.
        traNis0x%X: %si(RsRXRLRRRRRRRUR=R*RRRRRpR(R|tmRRg((s/usr/lib/python2.6/tarfile.pyR#s.
		

	cCsz|i}|djot|}n|i|}x;t|dddD]#}|||ijo	||SqOWdS(s}Find an archive member by name from bottom to top.
           If tarinfo is given, it is used as the starting point.
        iiN(RuRLRtindexR+R}(R|R}RRUR0R.((s/usr/lib/python2.6/tarfile.pyRp"	s
cCs:x*to"|i}|djoPqqWt|_dS(sWRead through the entire archive file and look for readable
           members.
        N(RR#RLRV(R|R((s/usr/lib/python2.6/tarfile.pyRt2	s

cCs\|iotd|iin|dj	o'|i|jotd|indS(snCheck if TarFile is still open, and if the operation's mode
           corresponds to TarFile's mode.
        s%s is closedsbad operation for mode %rN(RRQRRlRLR`(R|R`((s/usr/lib/python2.6/tarfile.pyRs<	s
cCs&|iot|iSt|SdS(s$Provide an iterator object.
        N(RVtiterRUtTarIter(R|((s/usr/lib/python2.6/tarfile.pyRE	s
cCs%||ijoti|IJndS(s.Write debugging output to sys.stderr.
        N(RSRtstderr(R|tleveltmsg((s/usr/lib/python2.6/tarfile.pyRM	sN(:RlRmRnRSRRQRRRTRER7RFR?RLR@RRRRR~RYR]RDtposixRGRoRzRcRlRnRaRRrRuRwRRRRRRRRRRRRRRRRRRR#RpRtRsRR(((s/usr/lib/python2.6/tarfile.pyRsn`		
H
			
	c9%!	'	0												$	
		RcBs)eZdZdZdZdZRS(sMIterator Class.

       for tarinfo in TarFile(...):
           suite...
    cCs||_d|_dS(s$Construct a TarIter object.
        iN(RR(R|R((s/usr/lib/python2.6/tarfile.pyR~[	s	cCs|S(s Return iterator object.
        ((R|((s/usr/lib/python2.6/tarfile.pyR`	scCs|iip0|ii}|pt|i_tqpn4y|ii|i}Wntj
o
tnX|id7_|S(sReturn the next item using TarFile's next() method.
           When all members have been read, set TarFile as _loaded.
        i(RRVR#Rt
StopIterationRURt
IndexError(R|R((s/usr/lib/python2.6/tarfile.pyR#d	s
(RlRmRnR~RR#(((s/usr/lib/python2.6/tarfile.pyRT	s		t_sectioncBs eZdZdZdZRS(s$Base class for _data and _hole.
    cCs||_||_dS(N(RR(R|RR((s/usr/lib/python2.6/tarfile.pyR~|	s	cCs&|i|jo|i|ijSS(N(RR(R|R((s/usr/lib/python2.6/tarfile.pyt__contains__	s(RlRmRnR~R(((s/usr/lib/python2.6/tarfile.pyRy	s	RcBseZdZdZRS(s/Represent a data section in a sparse file.
    cCs ti|||||_dS(N(RR~R(R|RRR((s/usr/lib/python2.6/tarfile.pyR~	s(RlRmRnR~(((s/usr/lib/python2.6/tarfile.pyR	sR%cBseZdZRS(s/Represent a hole section in a sparse file.
    (RlRmRn(((s/usr/lib/python2.6/tarfile.pyR%	sR$cBs eZdZdZdZRS(sMRingbuffer class which increases performance
       over a regular list.
    cCs
d|_dS(Ni(tidx(R|((s/usr/lib/python2.6/tarfile.pyR~	scCs}|i}xdto\||}||joPn|d7}|t|jo
d}n||ijodSqW||_|S(Nii(RRRRL(R|RRtitem((s/usr/lib/python2.6/tarfile.pyR$	s	




	(RlRmRnR~R$(((s/usr/lib/python2.6/tarfile.pyR$	s	t
TarFileCompatcBsteZdZdedZdZdZdZdZdZ	dZ
ddd	Zd
Z
dZRS(
sRTarFile class compatible with standard module zipfile's
       ZipFile class.
    R[cCsddkl}|ddd|tjoti|||_n3|tjoti|||_n
td|dd!d	joU|ii	}xC|D]7}|i
|_|i|_
ti|id
 |_qWndS(Ni(twarnpy3ks6the TarFileCompat class has been removed in Python 3.0t
stacklevelisunknown compression constantiiR[i(RZRt	TAR_PLAINRRcRtTAR_GZIPPEDRlR)RuR}RRt	file_sizeRtgmtimeRt	date_time(R|tfileR`tcompressionRRUR((s/usr/lib/python2.6/tarfile.pyR~	s	

cCstd|iS(NcSs|iS((R}(R((s/usr/lib/python2.6/tarfile.pyRk	s(tmaptinfolist(R|((s/usr/lib/python2.6/tarfile.pytnamelist	scCstd|iiS(NcSs
|itjS((RR6(R((s/usr/lib/python2.6/tarfile.pyRk	s(tfilterRRu(R|((s/usr/lib/python2.6/tarfile.pyR	s	cCs|iidS(N(RR(R|((s/usr/lib/python2.6/tarfile.pytprintdir	scCsdS(N((R|((s/usr/lib/python2.6/tarfile.pyttestzip	scCs|ii|S(N(RRr(R|R}((s/usr/lib/python2.6/tarfile.pytgetinfo	scCs"|ii|ii|iS(N(RRRrRP(R|R}((s/usr/lib/python2.6/tarfile.pyRP	scCs|ii||dS(N(RR(R|RRt
compress_type((s/usr/lib/python2.6/tarfile.pyRR	sc	Csyddkl}Wn#tj
oddkl}nXddk}t|i}t||_|i|i	|_
|ii|||dS(Ni(tStringIO(
t	cStringIORRtcalendarRRRRttimegmRRRR(R|tzinfotbytesRRttinfo((s/usr/lib/python2.6/tarfile.pytwritestr	scCs|iidS(N(RR(R|((s/usr/lib/python2.6/tarfile.pyR	sN(RlRmRnRR~RRRRRRPRLRRRR(((s/usr/lib/python2.6/tarfile.pyR	s							
cCs9yt|}|itSWntj
otSXdS(sfReturn True if name points to a tar archive that we
       are able to handle, else return False.
    N(RzRRRR(R}R]((s/usr/lib/python2.6/tarfile.pyR	s
(vRnt__version__tversiont
__author__t__date__t	__cvsid__t__credits__RRgRMR|RRR3RR+RRRRRRLt__all__R RRoRRRRRRRR:R8R<R>RR@tCONTTYPERRRRRRRR2RRER R6RR3RR(R4tS_IFLNKtS_IFREGRtS_IFDIRRtS_IFIFOtTSUIDtTSGIDtTSVTXtTUREADtTUWRITEtTUEXECtTGREADtTGWRITEtTGEXECtTOREADtTOWRITEtTOEXECtgetfilesystemencodingRFtgetdefaultencodingR#R&R/R8RBRKRNR_ReRjRhRt	ExceptionRRoRpRqRrR*RsRtobjectRRRRRRRRRR%RR$RRRRRzRO(((s/usr/lib/python2.6/tarfile.pyt<module>s.

					

						
					
	
	
		
DL4%	4	

ACC SHELL 2018