Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/debian/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/debian/arfile.pyc


}Nc@sdZeeZdZdZdefdYZdefdYZdefdYZ	e
d	kred
Zdjej
GHndS(
s!<arch>
i<s`
tArErrorcBseZRS((t__name__t
__module__(((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyRstArFilecBs}eZdZddddZdZdZdZeeZ	dZ
dZdZd	Z
d
ZdZRS(
s Representation of an ar archive, see man 1 ar.
    
    The interface of this class tries to mimick that of the TarFile module in
    the standard library.
    
    ArFile objects have the following (read-only) properties:
        - members       same as getmembers()
    trcCsAg|_i|_||_||_|dkr=|jndS(s Build an ar file representation starting from either a filename or
        an existing file object. The only supported mode is 'r' RN(t_ArFile__memberst_ArFile__members_dictt_ArFile__fnamet_ArFile__fileobjt_ArFile__index_archive(tselftfilenametmodetfileobj((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyt__init__%s				
cCs|jrt|jd}n|jr3|j}n	td|jttkr]tdnxtrtj	||j}|sPn|j
j|||j|j
<|jddkr|j|jdq`|j|jddq`W|jr|jndS(NtrbsUnable to open valid filesUnable to find global headeriii(RtopenRRtreadtGLOBAL_HEADER_LENGTHt
GLOBAL_HEADERtTruetArMembert	from_fileRtappendRtnametsizetseektclose(R
tfpt	newmember((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyt__index_archive2s$					cCs|j|S(s Return the (last occurrence of a) member in the archive whose name
        is 'name'. Raise KeyError if no member matches the given name.

        Note that in case of name collisions the only way to retrieve all
        members matching a given name is to use getmembers. (R(R
R((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyt	getmemberKscCs|jS(s Return a list of all members contained in the archive.

        The list has the same order of members in the archive and can contain
        duplicate members (i.e. members with the same name) if they are
        duplicate in the archive itself. (R(R
((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyt
getmembersTscCstd|jS(s3 Return a list of all member names in the archive. cSs|jS(N(R(tf((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyt<lambda>bs(tmapR(R
((s1/usr/lib/python2.7/dist-packages/debian/arfile.pytgetnames_scCs
tdS(s Not (yet) implemented. N(tNotImpelementedError(((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyt
extractalldscCs
tdS(s Not (yet) implemented. N(R%(R
tmembertpath((s1/usr/lib/python2.7/dist-packages/debian/arfile.pytextractiscCsTxM|jD]B}t|tr5|j|jkr5|S||jkrH|SdSq
WdS(s Return a file object corresponding to the requested member. A member
        can be specified either as a string (its name) or as a ArMember
        instance. N(Rt
isinstanceRRtNone(R
R'tm((s1/usr/lib/python2.7/dist-packages/debian/arfile.pytextractfilens!cCs
t|jS(s5 Iterate over the members of the present ar archive. (titerR(R
((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyt__iter__}scCs
|j|S(s Same as .getmember(name). (R(R
R((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyt__getitem__sN(RRt__doc__R+RR	RR tpropertytmembersR$R&R)R-R/R0(((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyRs
										RcBseZdZdZdZeeZddZddZddZ	ddZ
dZd	Zd
Z
dZedZed
ZedZedZedZedZedZRS(s Member of an ar archive.

    Implements most of a file object interface: read, readline, next,
    readlines, seek, tell, close.
    
    ArMember objects have the following (read-only) properties:
        - name      member name in an ar archive
        - mtime     modification time
        - owner     owner user
        - group     owner group
        - fmode     file permissions
        - size      size in bytes
        - fname     file namecCs^d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
dS(N(R+t_ArMember__namet_ArMember__mtimet_ArMember__ownert_ArMember__groupt_ArMember__fmodet_ArMember__sizet_ArMember__fnamet
_ArMember__fpt_ArMember__offsett_ArMember__end(R
((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyRs									cCs|jt}|sdSt|tkr7tdn|dd!tkrVtdnt}|dd!jddj|_	t
|dd!|_t
|dd	!|_t
|d	d
!|_
|d
d!|_t
|dd!|_||_|j|_|j|j|_|S(
sfp is an open File object positioned on a valid file header inside
        an ar archive. Return a new ArMember on success, None otherwise. sIncorrect header lengthi:i<sIncorrect file magiciit/ii"i(i0N(RtFILE_HEADER_LENGTHR+tlentIOErrort
FILE_MAGICRtsplittstripR4tintR5R6R7R8R9R:ttellR<R=(RtfnametbufR!((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyRs$
	#	icCs|jdkr:t|jd|_|jj|jn|jj}|dkrx||j|krx|jj|S||jks||jkrdS|jj|j|S(NRit(	R;R+RR:RR<RFR=R(R
Rtcur((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyRscCs|jdkr:t|jd|_|jj|jn|dk	rx|jj|}|jj|jkrtdS|S|jj}|jj|jkrdS|SdS(NRRI(	R;R+RR:RR<treadlineRFR=(R
RRH((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyRKscCsz|jdkr:t|jd|_|jj|jnd}g}x-tru|j}|sePn|j|qIW|S(NR(	R;R+RR:RR<RRKR(R
tsizehintRHtlines((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyt	readliness	cCs|jdkr:t|jd|_|jj|jn|jj|jkrh|jj|jn|dkr||jj|jkrtd|n|dkr|jj|dnR|dkr|jj|j|dn)|dkr|jj|j|dndS(NRisCan't seek at %dii(	R;R+RR:RR<RFRAR=(R
toffsettwhence((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyRs(cCsk|jdkr:t|jd|_|jj|jn|jj}||jkr\dS||jSdS(NRl(R;R+RR:RR<RF(R
RJ((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyRFscCs#|jdk	r|jjndS(N(R;R+R(R
((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyRscCs
|jS(N(RK(R
((s1/usr/lib/python2.7/dist-packages/debian/arfile.pytnext#scsfd}t|S(Nc3sj}|r|VndS(N(RK(tline(R
(s1/usr/lib/python2.7/dist-packages/debian/arfile.pytnextline's(R.(R
RS((R
s1/usr/lib/python2.7/dist-packages/debian/arfile.pyR/&scCs|jS(N(R4(R
((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyR".scCs|jS(N(R5(R
((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyR"/scCs|jS(N(R6(R
((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyR"0scCs|jS(N(R7(R
((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyR"1scCs|jS(N(R8(R
((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyR"2scCs|jS(N(R9(R
((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyR"3scCs|jS(N(R:(R
((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyR"4sN(RRR1RRtstaticmethodRR+RKRNRRFRRQR/R2RtmtimetownertgrouptfmodeRRG(((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyRs&
		)				t__main__stest.ars
N(RR@RR?RBt	ExceptionRtobjectRRRtatjoinR$(((s1/usr/lib/python2.7/dist-packages/debian/arfile.pyt<module>sm