MSV FM

[email protected]: ~ $
Path : /proc/self/root/lib64/python2.7/
File Upload :
Current < : //proc/self/root/lib64/python2.7/dumbdbm.pyc

�
zfc@swdZddlZddlZddlZddlZejZdZ	e
Zdej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�eZeZeZdd�Zd�Zd�ZeZd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�ZeZd�Zd�ZeZd�ZRS(tccCs�||_|dk|_|tjd|_|tjd|_|tjd|_d|_yt	|jd�}Wn<t
k
r�t	|jd��}|j|j�WdQXnX|j�|j
�dS(Ntrtdirtdattbaktw(t_modet	_readonlyt_ostextsept_dirfilet_datfilet_bakfiletNonet_indext_opentIOErrort_chmodtcloset_update(tselftfilebasenametmodetflagtf((s/usr/lib64/python2.7/dumbdbm.pyt__init__0s		

cCs�i|_yt|j�}Wntk
r<|j|_nVXt|_|�Dx<|D]4}|j�}tj	|�\}}||j|<qTWWdQXdS(N(
RRRRRt	_modifiedtFalsetrstript_asttliteral_eval(RRtlinetkeytpos_and_siz_pair((s/usr/lib64/python2.7/dumbdbm.pyRPs	
	
c	Cs�|jdks|jrdSy|jj|j�Wn|jjk
rMnXy|jj|j|j�Wn|jjk
r�nX|j	|jd��N}|j
|j�x4|jj�D]#\}}|jd||f�q�WWdQXdS(NRs%r, %r
(
RRRR	tunlinkR
terrortrenameRRRt	iteritemstwrite(RRR!R"((s/usr/lib64/python2.7/dumbdbm.pyt_commitascCsN|j|\}}t|jd��#}|j|�|j|�}WdQX|S(Ntrb(RRRtseektread(RR!tpostsizRR((s/usr/lib64/python2.7/dumbdbm.pyt__getitem__ys

cCs�t|jd��g}|jdd�t|j��}|tdtt}|jd||�|}|j|�WdQX|t|�fS(Nsrb+iiis(RRR*tintttellt
_BLOCKSIZER'tlen(RtvalRR,tnpos((s/usr/lib64/python2.7/dumbdbm.pyt_addval�scCsEt|jd��!}|j|�|j|�WdQX|t|�fS(Nsrb+(RRR*R'R2(RR,R3R((s/usr/lib64/python2.7/dumbdbm.pyt_setval�s
cCsS||j|<t|jd��.}|j|j�|jd||f�WdQXdS(Ntas%r, %r
(RRRRR'(RR!R"R((s/usr/lib64/python2.7/dumbdbm.pyt_addkey�s
cCs�t|�td�ko)t|�kns:td�nt|_||jkrn|j||j|��n{|j|\}}|tdt}t|�tdt}||kr�|j	||�|j|<n|j|�|j|<dS(Ntskeys and values must be stringsi(
ttypet	TypeErrortTrueRRR8R5R1R2R6(RR!R3R,R-t	oldblockst	newblocks((s/usr/lib64/python2.7/dumbdbm.pyt__setitem__�s.	cCs!t|_|j|=|j�dS(N(R<RRR((RR!((s/usr/lib64/python2.7/dumbdbm.pyt__delitem__�s	
cCs
|jj�S(N(Rtkeys(R((s/usr/lib64/python2.7/dumbdbm.pyRA�scCs
||jkS(N(R(RR!((s/usr/lib64/python2.7/dumbdbm.pythas_key�scCs
||jkS(N(R(RR!((s/usr/lib64/python2.7/dumbdbm.pyt__contains__�scCs
|jj�S(N(Rtiterkeys(R((s/usr/lib64/python2.7/dumbdbm.pyRD�scCs
t|j�S(N(R2R(R((s/usr/lib64/python2.7/dumbdbm.pyt__len__�scCs4z|j�Wdd|_|_|_|_XdS(N(R(RRRRR
(R((s/usr/lib64/python2.7/dumbdbm.pyR�scCs/t|jd�r+|jj||j�ndS(Ntchmod(thasattrR	RFR(Rtfile((s/usr/lib64/python2.7/dumbdbm.pyR�s(t__name__t
__module__R	RRRR(tsyncR.R5R6R8R?R@RARBRCRDt__iter__RERt__del__R(((s/usr/lib64/python2.7/dumbdbm.pyR#s*
 									
						i�cCsOy tjd�}tj|�Wntk
r3n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(R	tumasktAttributeErrorR(RHRRtum((s/usr/lib64/python2.7/dumbdbm.pytopen�s
(t__doc__tastRtosR	t__builtin__tUserDictRQRR1RR$t	DictMixinRR(((s/usr/lib64/python2.7/dumbdbm.pyt<module>s	�
Bethany
Bethany
0%

THE FINEST HOTEL NEAR LAKE KIVU

The Perfect Base For You

Required fields are followed by *





EC1A68011

About Us

Delicious Interior With The Pinch Of Everything

Bethany Investment group is Presbyterian church in Rwanda(EPR) company that manage Hotel and Guest house in Karongi (Bethany Hotel), ISANO branch in GIKONDO(Kigali), Kiyovu branch(Kigali), AMIZERO branch(Nyagatare-East) and Gisenyi Branch(Rubavu).

Accomodation

Get a Comfortable Room
Feel The Comfort

Get a comfortable room and feel our hotel’s comfort. Bethany Hotel features a variety of fully furnished rooms with extra space, Executive rooms, Deluxe rooms with a beautiful lake view and garden space, Deluxe rooms, comfort rooms, family rooms and standard rooms at your service.

Standard Single

Services

We Provide Top Class Facility
Especially For You

Beach BBQ Party

Kick back on the beach& and enjoy our berbecue from our masterchef

Breakfast

Kick back at our hotels& enjoy our breakfast from our masterchef

Conference Hall

Kick back at our hotels& enjoy our conference halls from all bethany branches

Enjoy with your partner

Honeymoon Package

80%

Get In Touch

Don’t Miss Any Update

    +

    Search your Room

    Required fields are followed by *