b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 104.21.65.202 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/dumbdbm.pyo
Size6.43 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:29
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@skdZddkZddkZddkZeiZdZeZ dei
fd��YZ ddd�ZdS(s­A dumb and slow but simple dbm clone.

For database spam, spam.dir contains the index (a text file),
spam.bak *may* contain a backup of the index (also a text file),
while spam.dat contains the data (a binary file).

XXX TO DO:

- seems to contain a bug when updating...

- reclaim free space (currently, space once occupied by deleted or expanded
items is never reused)

- support concurrent access (currently, if two processes take turns making
updates, they can mess up the index)

- support efficient access to large databases (currently, the whole index
is read when the database is opened, and some updates rewrite the whole index)

- support opening for read-only (flag = 'm')

iÿÿÿÿNit _DatabasecBs¶eZeZeZd�Zd�Zd�ZeZd�Zd�Z d�Z
d�Z d�Z d�Z
d �Zd
�Zd �Zd �ZeZd
�Zd�ZeZd�ZRS(cCs´||_|tid|_|tid|_|tid|_d|_yt|id�}Wn5t j
o)t|id�}|i
|i�nX|i �|i �dS(Ntdirtdattbaktrtw(
t_modet_ostextsept_dirfilet_datfilet_bakfiletNonet_indext_opentIOErrort_chmodtcloset_update(tselft filebasenametmodetf((s/usr/lib64/python2.6/dumbdbm.pyt__init__/s  
cCs|h|_yt|i�}Wntj
onHXx9|D]1}|i�}t|�\}}||i|<q9W|i�dS(N(R
RR RtrstriptevalR(RRtlinetkeytpos_and_siz_pair((s/usr/lib64/python2.6/dumbdbm.pyRMs  c Csë|idjodSy|ii|i�Wn|iij
onXy|ii|i|i�Wn|iij
onX|i|id�}|i |i�x4|ii
�D]#\}}|i d||f�q¶W|i �dS(NRs%r, %r
(
R
R RtunlinkR terrortrenameR RRt iteritemstwriteR(RRRR((s/usr/lib64/python2.6/dumbdbm.pyt_commit]s  cCsO|i|\}}t|id�}|i|�|i|�}|i�|S(Ntrb(R
RR
tseektreadR(RRtpostsizRR((s/usr/lib64/python2.6/dumbdbm.pyt __getitem__vs 

cCs�t|id�}|idd�t|i��}|tdtt}|id||�|}|i|�|i�|t|�fS(Nsrb+iiit( RR
R$tintttellt
_BLOCKSIZER!Rtlen(RtvalRR&tnpos((s/usr/lib64/python2.6/dumbdbm.pyt_addval�s

cCsFt|id�}|i|�|i|�|i�|t|�fS(Nsrb+(RR
R$R!RR-(RR&R.R((s/usr/lib64/python2.6/dumbdbm.pyt_setval�s



cCsT||i|<t|id�}|i|i�|id||f�|i�dS(Ntas%r, %r
(R
RR RR!R(RRRR((s/usr/lib64/python2.6/dumbdbm.pyt_addkey�s

cCsët|�td�jot|�jnp
td�n||ijo|i||i|��n~|i|\}}|tdt}t|�tdt}||jo|i||�|i|<n|i|�|i|<dS(Ntskeys and values must be stringsi(ttypet TypeErrorR
R3R0R,R-R1(RRR.R&R't oldblockst newblocks((s/usr/lib64/python2.6/dumbdbm.pyt __setitem__¢s0

cCs|i|=|i�dS(N(R
R"(RR((s/usr/lib64/python2.6/dumbdbm.pyt __delitem__½s
cCs
|ii�S(N(R
tkeys(R((s/usr/lib64/python2.6/dumbdbm.pyR;ÆscCs
||ijS(N(R
(RR((s/usr/lib64/python2.6/dumbdbm.pythas_keyÉscCs
||ijS(N(R
(RR((s/usr/lib64/python2.6/dumbdbm.pyt __contains__ÌscCs
|ii�S(N(R
titerkeys(R((s/usr/lib64/python2.6/dumbdbm.pyR>ÏscCs
t|i�S(N(R-R
(R((s/usr/lib64/python2.6/dumbdbm.pyt__len__ÓscCs,|i�d|_|_|_|_dS(N(R"R R
R
R R (R((s/usr/lib64/python2.6/dumbdbm.pyRÖs
cCs1t|id�o|ii||i�ndS(Ntchmod(thasattrRR@R(Rtfile((s/usr/lib64/python2.6/dumbdbm.pyRÜs(t__name__t
__module__RRRRR"tsyncR(R0R1R3R9R:R;R<R=R>t__iter__R?Rt__del__R(((s/usr/lib64/python2.6/dumbdbm.pyR"s*
    
       i¶cCsNy tid�}ti|�Wntj
on
X||@}t||�S(sôOpen the database file, filename, and return corresponding object.

The flag argument, used to control how the database is opened in the
other DBM implementations, is ignored in the dumbdbm module; the
database is always opened for update, and will be created if it does
not exist.

The optional mode argument is the UNIX mode of the file, used only when
the database has to be created. It defaults to octal code 0666 (and
will be modified by the prevailing umask).

i(RtumasktAttributeErrorR(RBtflagRtum((s/usr/lib64/python2.6/dumbdbm.pytopenás (
t__doc__tosRt __builtin__tUserDictRLRR,RRt DictMixinRR (((s/usr/lib64/python2.6/dumbdbm.pyt<module>s    ¿