ACC SHELL

Path : /usr/lib/python/bsddb/
File Upload :
Current File : //usr/lib/python/bsddb/dbshelve.pyo

Ñò
q&ÄMc@sWdZddkZddkZddkZeiddjZeoddUn
ddkZeid djo7eiZeid djo
d„Zq¶d	„ZndZd
„Zyddk	l
Z
Wn&ej
oddd
„ƒYZ
nXeidei
ddd„Zdeifd„ƒYZde
fd„ƒYZddd„ƒYZdS(sNManage shelves of pickled objects using bsddb database files for the
storage.
iÿÿÿÿNiisfrom . import dbiicCsti||ƒS(N(tcPickletdumps(tobjecttprotocol((s$/usr/lib/python2.6/bsddb/dbshelve.pyt_dumps2scCsti|d|ƒS(NR(RR(RR((s$/usr/lib/python2.6/bsddb/dbshelve.pyR5scCsti|d|ƒS(Ntbin(RR(RR((s$/usr/lib/python2.6/bsddb/dbshelve.pyR:s(t	DictMixinRcBseZRS((t__name__t
__module__(((s$/usr/lib/python2.6/bsddb/dbshelve.pyRBsi°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_* flags(ttypetdbt	DB_RDONLYt	DB_CREATEtDB_TRUNCATEtDBErrortDBShelftopen(tfilenametflagstmodetfiletypetdbenvtdbnametsflagtd((s$/usr/lib/python2.6/bsddb/dbshelve.pyRGs 








t
DBShelveErrorcBseZRS((RR(((s$/usr/lib/python2.6/bsddb/dbshelve.pyRjsRcBsõeZdZdd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
dd„Zd	„Zd
„Z
d„Zdd„Zdd
„Zdd„Zdd„Zdd„Zd„Zddd„Zddd„Zddd„Zdd„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.
    cCs<ti|ƒ|_t|_to
t|_n
d|_dS(Ni(RtDBtTruet_closedtHIGHEST_PROTOCOLR(tselfR((s$/usr/lib/python2.6/bsddb/dbshelve.pyt__init__qs
	
cCs|iƒdS(N(tclose(R$((s$/usr/lib/python2.6/bsddb/dbshelve.pyt__del__zscCst|i|ƒS(sTMany methods we can just pass through to the DB object.
        (See below)
        (tgetattrR(R$tname((s$/usr/lib/python2.6/bsddb/dbshelve.pyt__getattr__~scCs
t|iƒS(N(tlenR(R$((s$/usr/lib/python2.6/bsddb/dbshelve.pyt__len__ˆscCs|i|}ti|ƒS(N(RRtloads(R$tkeytdata((s$/usr/lib/python2.6/bsddb/dbshelve.pyt__getitem__Œs
cCs#t||iƒ}||i|<dS(N(RRR(R$R.tvalueR/((s$/usr/lib/python2.6/bsddb/dbshelve.pyt__setitem__‘scCs|i|=dS(N(R(R$R.((s$/usr/lib/python2.6/bsddb/dbshelve.pyt__delitem__–scCs/|djo|ii|ƒS|iiƒSdS(N(tNoneRtkeys(R$ttxn((s$/usr/lib/python2.6/bsddb/dbshelve.pyR5šs
cOs |ii||Žt|_dS(N(RRtFalseR"(R$targstkwargs((s$/usr/lib/python2.6/bsddb/dbshelve.pyR¡scOs |ii||Žt|_dS(N(RR&R!R"(R$R8R9((s$/usr/lib/python2.6/bsddb/dbshelve.pyR&¦scCs3|iodt|ƒStt|iƒƒƒSdS(Ns<DBShelf @ 0x%x - closed>(R"tidtreprtdictt	iteritems(R$((s$/usr/lib/python2.6/bsddb/dbshelve.pyt__repr__«s
cCso|djo|ii|ƒ}n|iiƒ}g}x0|D](\}}|i|ti|ƒfƒq?W|S(N(R4RtitemstappendRR-(R$R6R?tnewitemstktv((s$/usr/lib/python2.6/bsddb/dbshelve.pyR?²s
 cCsB|djo|ii|ƒ}n|iiƒ}tti|ƒS(N(R4RtvaluestmapRR-(R$R6RD((s$/usr/lib/python2.6/bsddb/dbshelve.pyRD½s
cCs%t||iƒ}|ii||ƒS(N(RRRR@(R$R1R6R/((s$/usr/lib/python2.6/bsddb/dbshelve.pyt__appendÈscCs7|iƒtijo|i|d|ƒStd‚dS(NR6sOappend() only supported when dbshelve opened with filetype=dbshelve.db.DB_RECNO(tget_typeRtDB_RECNOt_DBShelf__appendR(R$R1R6((s$/usr/lib/python2.6/bsddb/dbshelve.pyR@ÌsicCs"|d„}|ii|||ƒS(NcSs\tiddjpt|tƒoti|ƒ}ntit|dƒƒ}|||ƒS(Niis	iso8859-1(tsystversion_infot
isinstancetbytesRR-(tpriKeytpriDatatrealCallbackR/((s$/usr/lib/python2.6/bsddb/dbshelve.pyt_shelf_callbackÓs$(Rt	associate(R$tsecondaryDBtcallbackRRQ((s$/usr/lib/python2.6/bsddb/dbshelve.pyRRÒscOsPt|ii||ƒ}yti|ƒSWn tttifj
o|SXdS(N(tapplyRtgetRR-tEOFErrort	TypeErrortUnpicklingError(R$R8tkwR/((s$/usr/lib/python2.6/bsddb/dbshelve.pyRVßs
cCs:t||iƒ}|ii||||ƒ}ti|ƒS(N(RRRRVRR-(R$R.R1R6RR/((s$/usr/lib/python2.6/bsddb/dbshelve.pytget_bothëscCs+t|ii||ƒƒ}|i|_|S(N(t
DBShelfCursorRtcursorR(R$R6RR
((s$/usr/lib/python2.6/bsddb/dbshelve.pyR]ñscCs+t||iƒ}|ii||||ƒS(N(RRRtput(R$R.R1R6RR/((s$/usr/lib/python2.6/bsddb/dbshelve.pyR^÷scCs
t‚dS(N(tNotImplementedError(R$t
cursorListR((s$/usr/lib/python2.6/bsddb/dbshelve.pytjoinüsN(RRt__doc__R4R%R'R*R,R0R2R3R5RR&R>R?RDRIR@RRRVR[R]R^Ra(((s$/usr/lib/python2.6/bsddb/dbshelve.pyRms,			
							
	R\cBseZdZd„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(tdbc(R$R]((s$/usr/lib/python2.6/bsddb/dbshelve.pyR%
scCs|iƒdS(N(R&(R$((s$/usr/lib/python2.6/bsddb/dbshelve.pyR'scCst|i|ƒS(sHSome methods we can just pass through to the cursor object.  (See below)(R(Rc(R$R)((s$/usr/lib/python2.6/bsddb/dbshelve.pyR*sicCs(t|ii|ƒƒ}|i|_|S(N(R\RctdupR(R$RR
((s$/usr/lib/python2.6/bsddb/dbshelve.pyRdscCs(t||iƒ}|ii|||ƒS(N(RRRcR^(R$R.R1RR/((s$/usr/lib/python2.6/bsddb/dbshelve.pyR^!scGs0t|ƒ}t|d|ƒ}t||ƒdS(Nsget_%d(R+R(RU(R$R8tcounttmethod((s$/usr/lib/python2.6/bsddb/dbshelve.pyRV&scCs|ii|ƒ}|i|ƒS(N(RcRVt_extract(R$Rtrec((s$/usr/lib/python2.6/bsddb/dbshelve.pytget_1+scCs"|ii||ƒ}|i|ƒS(N(RcRVRg(R$R.RRh((s$/usr/lib/python2.6/bsddb/dbshelve.pytget_2/scCs4t||iƒ}|ii||ƒ}|i|ƒS(N(RRRcRVRg(R$R.R1RR/Rh((s$/usr/lib/python2.6/bsddb/dbshelve.pytget_33scCs|i|tiBƒS(N(RiRt
DB_CURRENT(R$R((s$/usr/lib/python2.6/bsddb/dbshelve.pytcurrent9scCs|i|tiBƒS(N(RiRtDB_FIRST(R$R((s$/usr/lib/python2.6/bsddb/dbshelve.pytfirst:scCs|i|tiBƒS(N(RiRtDB_LAST(R$R((s$/usr/lib/python2.6/bsddb/dbshelve.pytlast;scCs|i|tiBƒS(N(RiRtDB_NEXT(R$R((s$/usr/lib/python2.6/bsddb/dbshelve.pytnext<scCs|i|tiBƒS(N(RiRtDB_PREV(R$R((s$/usr/lib/python2.6/bsddb/dbshelve.pytprev=scCs|i|tiBƒS(N(RiRt
DB_CONSUME(R$R((s$/usr/lib/python2.6/bsddb/dbshelve.pytconsume>scCs|i|tiBƒS(N(RiRtDB_NEXT_DUP(R$R((s$/usr/lib/python2.6/bsddb/dbshelve.pytnext_dup?scCs|i|tiBƒS(N(RiRt
DB_NEXT_NODUP(R$R((s$/usr/lib/python2.6/bsddb/dbshelve.pyt
next_nodup@scCs|i|tiBƒS(N(RiRt
DB_PREV_NODUP(R$R((s$/usr/lib/python2.6/bsddb/dbshelve.pyt
prev_nodupAscCs4t||iƒ}|ii||ƒ}|i|ƒS(N(RRRcR[Rg(R$R.R1RR/Rh((s$/usr/lib/python2.6/bsddb/dbshelve.pyR[DscCs"|ii||ƒ}|i|ƒS(N(RctsetRg(R$R.RRh((s$/usr/lib/python2.6/bsddb/dbshelve.pyR~JscCs"|ii||ƒ}|i|ƒS(N(Rct	set_rangeRg(R$R.RRh((s$/usr/lib/python2.6/bsddb/dbshelve.pyRNscCs"|ii||ƒ}|i|ƒS(N(Rct	set_recnoRg(R$trecnoRRh((s$/usr/lib/python2.6/bsddb/dbshelve.pyR€RscCsv|djodS|\}}tiddjpt|tƒo|ti|ƒfS|tit|dƒƒfSdS(Niis	iso8859-1(R4RJRKRLRMRR-(R$RhR.R/((s$/usr/lib/python2.6/bsddb/dbshelve.pyRgXs
$(RRRbR%R'R*RdR^RVRiRjRkRmRoRqRsRuRwRyR{R}R[R~RR€tset_bothRg(((s$/usr/lib/python2.6/bsddb/dbshelve.pyR\
s2							(iii(iii(((RbRRJRKtabsolute_importRR#RR4tUserDictRtImportErrorRtDB_HASHRRRRR\(((s$/usr/lib/python2.6/bsddb/dbshelve.pyt<module>s.	

	"

ACC SHELL 2018