KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21572/root/usr/lib64/python2.4/bsddb/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21572/root/usr/lib64/python2.4/bsddb/dbshelve.pyo
mò
‚=5Dc@sdZdkZydklZWn&ej
odfd„ƒYZnXdkZeideiddd„Z	defd„ƒYZ
d	fd
„ƒYZdS(sNManage shelves of pickled objects using bsddb database files for the
storage.
N(s	DictMixint	DictMixincBstZRS(N(t__name__t
__module__(((t&/usr/lib64/python2.4/bsddb/dbshelve.pyR%si°cCsÞt|ƒtdƒjoœ|}|djo
ti}qµ|djo
d}qµ|djo
ti}qµ|djo
ti}qµ|djotitiB}qµtid‚nt|ƒ}|i|||||ƒ|S(
s(
    A simple factory function for compatibility with the standard
    shleve.py module.  It can be used like this, where key is a string
    and data is a pickleable object:

        from bsddb import dbshelve
        db = dbshelve.open(filename)

        db[key] = data

        db.close()
    ttrtrwitwtctnsJflags should be one of 'r', 'w', 'c' or 'n' or use the bsddb.db.DB_* flagsN(ttypetflagstsflagtdbt	DB_RDONLYt	DB_CREATEtDB_TRUNCATEtDBErrortDBShelftdbenvtdtopentfilenametdbnametfiletypetmode(RRRRRRRR((RR+s"









RcBsÚtZdZed„Zd„Zd„Zd„Zd„Zd„Z	d„Z
ed„Zed	„Zed
„Z
ed„Zed„Zd
d„Zd„Zed
d„Zed
d„Zed
d„Zd
d„ZRS(sŽA shelf to hold pickled objects, built upon a bsddb DB object.  It
    automatically pickles/unpickles data objects going to/from the DB.
    cCsti|ƒ|_d|_dS(Ni(R
tDBRtselftbinary(RR((Rt__init__RscCs|iƒdS(N(Rtclose(R((Rt__del__WscCst|i|ƒS(sTMany methods we can just pass through to the DB object.
        (See below)
        N(tgetattrRR
tname(RR!((Rt__getattr__[scCs
t|iƒS(N(tlenRR
(R((Rt__len__escCs|i|}ti|ƒS(N(RR
tkeytdatatcPickletloads(RR%R&((Rt__getitem__is
cCs&ti||iƒ}||i|<dS(N(R'tdumpstvalueRRR&R
R%(RR%R+R&((Rt__setitem__nscCs|i|=dS(N(RR
R%(RR%((Rt__delitem__sscCs2|djo|ii|ƒSn|iiƒSdS(N(ttxntNoneRR
tkeys(RR.((RR0ws
cCso|djo|ii|ƒ}n|iiƒ}g}x0|D](\}}|i|t	i
|ƒfƒq?W|S(N(R.R/RR
titemstnewitemstktvtappendR'R((RR.R2R1R4R3((RR1~s
 cCsB|djo|ii|ƒ}n|iiƒ}tti|ƒS(N(R.R/RR
tvaluestmapR'R((RR.R6((RR6‰s
cCs(ti||iƒ}|ii||ƒS(N(	R'R*R+RRR&R
R5R.(RR+R.R&((Rt__append”scCsI|iƒtijo#|i|_|i|d|ƒSntid‚dS(NR.sOappend() only supported when dbshelve opened with filetype=dbshelve.db.DB_RECNO(	Rtget_typeR
tDB_RECNOt_DBShelf__appendR5R+R.R(RR+R.((RR5˜sicCs"|d„}|ii|||ƒS(NcCsti|ƒ}|||ƒS(N(R'R(tpriDataR&trealCallbacktpriKey(R>R<R=R&((Rt_shelf_callback s(tcallbackR?RR
t	associatetsecondaryDBR(RRBR@RR?((RRAŸscOsPt|ii||ƒ}yti|ƒSWn t	ti
fj
o|SnXdS(N(tapplyRR
tgettargstkwR&R'R(t	TypeErrortUnpicklingError(RRERFR&((RRD§s
cCs=ti||iƒ}|ii||||ƒ}ti|ƒS(N(R'R*R+RRR&R
RDR%R.RR((RR%R+R.RR&((Rtget_both³scCs+t|ii||ƒƒ}|i|_|S(N(t
DBShelfCursorRR
tcursorR.RRR(RR.RR((RRK¹scCs.ti||iƒ}|ii||||ƒS(N(R'R*R+RRR&R
tputR%R.R(RR%R+R.RR&((RRL¿scCs
t‚dS(N(tNotImplementedError(Rt
cursorListR((RtjoinÄs(RRt__doc__R/RRR"R$R)R,R-R0R1R6R;R5RARDRIRKRLRO(((RRNs&		
					RJcBstZdZd„Zd„Zd„Zdd„Zdd„Zd„Zd„Z	d	„Z
d
„Zdd„Zdd„Z
dd
„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„ZeZd„ZRS(s
    cCs
||_dS(N(RKRtdbc(RRK((RRÕscCs|iƒdS(N(RR(R((RRØscCst|i|ƒS(sHSome methods we can just pass through to the cursor object.  (See below)N(R RRQR!(RR!((RR"ÜsicCst|ii|ƒƒS(N(RJRRQtdupR(RR((RRRãscCs+ti||iƒ}|ii|||ƒS(N(
R'R*R+RRR&RQRLR%R(RR%R+RR&((RRLçscGs0t|ƒ}t|d|ƒ}t||ƒdS(Nsget_%d(R#REtcountR RtmethodRC(RRERSRT((RRDìscCs|ii|ƒ}|i|ƒS(N(RRQRDRtrect_extract(RRRU((Rtget_1ñscCs"|ii||ƒ}|i|ƒS(N(RRQRDR%RRURV(RR%RRU((Rtget_2õscCs7ti||iƒ}|ii||ƒ}|i|ƒS(N(R'R*R+RRR&RQRDR%RRURV(RR%R+RRUR&((Rtget_3ùscCs|i|tiBƒS(N(RRWRR
t
DB_CURRENT(RR((RtcurrentÿscCs|i|tiBƒS(N(RRWRR
tDB_FIRST(RR((RtfirstscCs|i|tiBƒS(N(RRWRR
tDB_LAST(RR((RtlastscCs|i|tiBƒS(N(RRWRR
tDB_NEXT(RR((RtnextscCs|i|tiBƒS(N(RRWRR
tDB_PREV(RR((RtprevscCs|i|tiBƒS(N(RRWRR
t
DB_CONSUME(RR((RtconsumescCs|i|tiBƒS(N(RRWRR
tDB_NEXT_DUP(RR((Rtnext_dupscCs|i|tiBƒS(N(RRWRR
t
DB_NEXT_NODUP(RR((Rt
next_nodupscCs|i|tiBƒS(N(RRWRR
t
DB_PREV_NODUP(RR((Rt
prev_nodupscCs7ti||iƒ}|ii||ƒ}|i|ƒS(N(R'R*R+RRR&RQRIR%RRURV(RR%R+RRUR&((RRI
scCs"|ii||ƒ}|i|ƒS(N(RRQtsetR%RRURV(RR%RRU((RRlscCs"|ii||ƒ}|i|ƒS(N(RRQt	set_rangeR%RRURV(RR%RRU((RRmscCs"|ii||ƒ}|i|ƒS(N(RRQt	set_recnotrecnoRRURV(RRoRRU((RRnscCs8|djodSn |\}}|ti|ƒfSdS(N(RUR/R%R&R'R((RRUR%R&((RRVs
(RRRPRRR"RRRLRDRWRXRYR[R]R_RaRcReRgRiRkRIRlRmRntset_bothRV(((RRJÒs2							(RPR'tUserDictRtImportErrorR
RtDB_HASHR/RRRJ(R'RR
RJRR((Rt?s		#„

Anon7 - 2021