MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/usr/lib/python2.4/site-packages/mx/BeeBase/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib/python2.4/site-packages/mx/BeeBase/BeeDict.pyc
mò
!N5?c@s¸dZdkZdkZdkZdkZdklZeiZdkTei	Z	ei
Z
dZdeifd„ƒYZ
de
fd„ƒYZd	e
fd
„ƒYZdfd„ƒYZd
fd„ƒYZdefd„ƒYZdefd„ƒYZeeƒdefd„ƒYZeeƒdefd„ƒYZeeƒd„Zedjo^edƒZded<ded<ded<ed ƒZded<ded<ded<[[ndS(!s/ BeeDict - On-disk dictionary like databases


N(sTools(t*iètErrorcBstZRS(N(t__name__t
__module__(((t6/usr/lib/python2.4/site-packages/mx/BeeBase/BeeDict.pyRstRecreateIndexErrorcBstZdZRS(s… This error is raised in case the index for a dictionary was
        not found and/or needs to be recreated by running recovery.
    (RRt__doc__(((RRstRecoverErrorcBstZdZRS(sq This error is raised in case the storage for a dictionary was
        found to be in an inconsistent state.
    (RRR(((RR"stBeeBaseDictcBsgtZdZdZeZeZdZeZdZ	dZ
eZeZd„Z
d„Zd„Zed„Zd„Zd„Zd	„Zd
„Zd d
„Zeed!d„Zdd„Zd„Zd"eeed„Zd„Zeeed„Zeeeed„Z ed„Z!d„Z"d„Z#d„Z$d„Z%d„Z&d„Z'd„Z(ed„Z)d„Z*RS(#s Base class that collects some method that all dicts can usually
        share without modification.

        The base class implements a transaction based caching
        mechanism.  The cache stores data in the form
        key:(state,value) where state is:

        * 0 for read but not yet modified
        * 1 for modified
        * 2 for deleted
        * 3 for key read, value still on disk

        The .commit method has to implement the needed disk mechanism
        to write the cache data to disk storage.
        
    tNoNameicCs
h|_dS(s Inits the cache.
        N(tselftcache(R
((Rt__init__KscCs
t|iƒS(N(tlenR
tindex(R
((Rt__len__QscCsg|ipY|iƒx?|i|ifD]+}|dj	o|iƒ|iƒq'q'Wd|_ndS(sŽ Flush buffers and close.

            This issues a .rollback(), so the current transaction is
            rolled back.
            
        iN(	R
tclosedtrollbackRtstoragetobjtNonetflushtclose(R
R((RRUs



cCs6|ip(y|iƒWq2|j
oq2XndS(s) Make sure the object is closed.
        N(R
RRtAttributeError(R
R((Rt__del__es
cCsF|idj	o|iiƒn|idj	o|iiƒndS(s  Flush buffers to disk.
        N(R
RRRR(R
((RRrs
cCs d|ii|it|ƒfS(Ns<%s instance for "%s" at 0x%x>(R
t	__class__Rtnametid(R
((Rt__repr__{scCs|iiƒ|iƒdS(sÇ Commit all changes and start a new transaction.

            This method does not implement any disk operation, but
            takes care of managing the cache. Post-override.
            
        N(R
RtclearR(R
((Rtcommits
cCs|iiƒ|iƒdS(sÇ Take back all changes and start a new transaction.

            Overriding is normally not needed. This method only takes
            care of managing the cache. Post-override.
            
        N(R
RRR(R
((RRs
iicCsM|io?x<|iiƒD]'\}\}}||jodSqqWndS(st Return true in case the current transaction includes changes
            to the database, false otherwise.
        iiN(R
Rtitemstkeytstatetvaluetmodified(R
R#R"R R!((Rtchangeds

ic	CsÆ|i}x8|iƒD]*\}\}}||jo||=qqW||ƒ}||joe|i
o|iƒdSntt
d|ƒ|d|jo$tt
dƒ|iƒtd‚qÂndS(s˜ Remove all unmodified entries from the cache.

            If self.autocommit and the cache cleanup did not reduce
            the size below the MAXCACHESIZE limit, a .commit() will be
            executed automatically.

            Otherwise the processing continues. If the cache size hits
            2 * MAXCACHESIZE, a forced .rollback() is done and an
            error raised.
            
        Ns*Cache overflow: %i modified items in cacheis$Cache overflow: forced a .rollback()s,cache overflow; last transaction rolled back(R
RRR R!R"t
unmodifiedR
tsizetMAXCACHESIZEt
autocommitRtlogtSYSTEM_ERRORRR(	R
R
R'R%RR!R"R R&((Rt
free_cacheªs$	






cCs
td‚dS(sù Read and return the value corresponding to key.

            If checkonly is true, only the availability of a value
            has to be checked.

            Override this method with an implementation that accesses
            the disk.
        s
key not foundN(tKeyError(R
R t	checkonly((RtreadËs	cCsd|f|i|<dS(s¡ Save the item in the dictionary.

            Note that it is written to the cache first. Use .commit()
            to make sure it is written to disk.
        iN(R"R
RR (R
R R"((Rt__setitem__×sc	Cs¦y2|i}||\}}||jo|SnWn|j
onX|djo
|d‚n|i|ƒ}||ƒ|jo|i
ƒnd|f||<|S(s¤ Get an item from the dictionary.

            This first tries to read the item from cache and reverts
            to the disk storage if it is not found.
        iskey deletediN(R
RR R!R"tvalidstatesR,R.R
R'R+(	R
R R0R
R,R'RR!R"((Rt__getitem__às		


cCs;|i}|i|ƒp|i|dƒnd||<dS(s‹ Delete an item.

            The item is only marked for deletion. The next .commit()
            will make the action permanent.
        iiN(iN(R
Rthas_keyR R.R(R
R R((Rt__delitem__ÿs
	cCs®y6|i}||\}}|djodSndSWn|j
onXy|i|ƒ}Wn|j
odSnX||ƒ|jo|i	ƒnd|f||<dS(s  Check if the dictionary has an item indexed by key.

            Successfully found items are put in the cache for fast
            subsequent access.
        iiiN(
R
RR R!R"R,R.R
R'R+(R
R R
R,R'RR!R"((RR2s"	
	c	Cs®y6|i}||\}}|djo|Sn|SWn|j
onXy|i|ƒ}Wn|j
o|SnX||ƒ|jo|i
ƒnd|f||<|S(sß Get item indexed by key from the dictionary or default if
            no such item exists.

            This first tries to read the item from cache and reverts
            to the disk storage if it is not found.

        iiN(R
RR R!R"tdefaultR,R.R
R'R+(	R
R R4R
R,R'RR!R"((Rtget*s"
	
	cCs[|io|iƒo
td‚n|ii|dƒ}|djo|Snt	||ƒS(sf Return a cursor instance for this kind of dictionary.

            In case the key is not found, default is returned instead.
            Note that cursors operate with the data on disk meaning
            that any uncommitted changes will not be seen by the
            cursor.

            Has to be overridden to return a suitable cursor object.
        suncommitted data existsN(
R
RR$RRtcursorR RR4tBeeBaseDictCursor(R
R R4R6((RR6Ks


cCs |iiƒ\}}}||S(s¨ Determine the amount of garbage in bytes that has accumulated
            in the storage file.

            This amount would be freed if .collect() were run.
        N(R
Rt
statisticstvalidtoldtinvalid(R
R9R:R;((Rtgarbage_scCsy|io
td‚n|io|iƒo
td‚n|iƒttd|ƒ|ii	|i
ƒ|iiƒdS(s8 Run the storage garbage collector.

            Storage collection can only be done for writeable
            dictionaries and then only if the current transaction does
            not contain any pending changes.

            This can take a while depending on the size of the
            dictionary.

        sdict is read-onlysuncommitted data existss
Collecting %sN(R
treadonlyRRR$RR)tSYSTEM_INFORtcollecttcollect_callbacktend_transaction(R
((RR?is



cCs
td‚dS(sÛ Internal callback used to update the index when
            the storage garbage collector moves a record.

            This method must be overridden to account for the
            different indexing schemes.

        s#.collect_callback() not implementedN(R(R
told_positiontnew_positiontraw_data((RR@scCsAttd|ƒ|iiƒ|ii|iƒ|iiƒdS(s; Recover all valid records and recreate the index.
        s
Recovering %sN(	R)R>R
RRRtrecovertrecover_callbackRA(R
((RREŒs

cCs
td‚dS(sc Internal callback used to update the index when
            the storage recovery collector finds a record.

            old_position is only given as additional information,
            new_position contains the position of the found record.

            This method must be overridden to account for the
            different indexing schemes.

        s#.recover_callback() not implementedN(R(R
RBRCRD((RRF˜scCs1ttd|ƒ|iiƒp
td‚ndS(s Checks the consistency of the index and raises an
            RecreateIndexError in case the index is found to be
            inconsistent.

            Validation takes places for the data on disk. The in
            memory data is not checked.

        sValidating index for %ssindex is inconsistentN(R)R>R
RtvalidateR(R
((Rtvalidate_index¦s	cCsttd|ƒdS(sg Checks the consistency of the storage and raises an
            RecoverError in case it is found to be
            inconsistent.
            
            Validation takes places for the data on disk. The in
            memory data is not checked.

            XXX This currently does nothing since storages don't
            support validation yet.

        sValidating storage for %sN(R)R>R
(R
((Rtvalidate_storage´scCs|iƒ|ii|ƒdS(s¼ Issues a backup request to the storage using archive
            which defaults to the storage filename + '.backup'.

            This causes an implicit .rollback() to be done.

        N(R
RRtbackuptarchive(R
RK((RRJÄs
cCs
td‚dS(sg Restores the storage from an archive file.

            XXX Currently does NOT work.
        
        s.restore() not implemented !N(tSystemError(R
RK((RtrestoreÏs(ii(ii(ii(+RRRRRRRRRR=R(tFirstKeytLastKeyRRRRRRRRRR$R
R'R+R.R/R,R1R3R2R5R6R<R?R@RERFRHRIRJRM(((RR+sH			
					
!			!	
						R7cBsYtZdZeZd„Zed„Zd„Zd„Zd„Z	d„Z
dd„ZRS(	sþ Cursor for BeeBaseDict subclasses.

        The read/read_key/write methods assume that the dictionary
        uses a BeeKeyValueStorage instances as storage facility.

        Note that modifying the targetted dictionary while using a
        cursor can cause the cursor to skip new entries or fail due to
        deleted items. Especially deleting the key to which the cursor
        currently points can cause errors to be raised.  In all other
        cases, the cursor will be repositioned.
        
    cCs.||_||_|i|_|i|_dS(N(tdictR
R6R R"(R
RPR6((RRês		cCs|iii|ƒ|_}|od|i|joTxQ|iƒo6|i|joPn|i|jo
td‚q6q6Wtd‚n||_||_dS(sÔ Position the index cursor to index[key]. If value is given,
            index[key] == value is assured.

            key may also be FirstKey or LastKey (in which case value
            has to be None).
        s
key not foundN(R
RPRR6R R"tnextR,(R
R R"R6((Rtpositionñs

	cCs^|i}|ip#|i|i|iƒ|i}n|iƒ}|i|_|i|_|S(s‘ Moves to the next entry in the dictionary.

            Returns true on success, false if the end-of-data has been
            reached.
        N(R
R6R9RRR R"RQtrc(R
R6RS((RRQs	

cCs^|i}|ip#|i|i|iƒ|i}n|iƒ}|i|_|i|_|S(s• Moves to the previous entry in the dictionary.

            Returns true on success, false if the end-of-data has been
            reached.
        N(R
R6R9RRR R"tprevRS(R
R6RS((RRTs	

cCs|i|iS(s# Reads the object from the dict to which the cursor
            currently points.

            This method assumes a BeeKeyValueStorage instance in
            self.storage and an index that holds copies of the key
            objects. Override if this is not the case.
            
        N(R
RPR (R
((RR.'s	cCs|iii|iƒS(s¡ Reads the key object from the dict to which the cursor
            currently points.

            This method is intended for dictionaries that store hash
            values in the index. Normally, accessing the instance
            variable .key would give the current key object.

            This method assumes a BeeKeyValueStorage instance in
            self.storage. Override if this is not the case.
        N(R
RPRtread_keyR"(R
((RRU3sicCs||i|i<dS(sš Writes the object to the dict under the key to which
            the cursor currently points.

            The new data is not written to disk until the dictionaries
            current transaction is committed.

            This method assumes a BeeKeyValueStorage instance in
            self.storage and an index that holds copies of the key
            objects. Override if this is not the case.

        N(tobjectR
RPR (R
RVtminsize((RtwriteAs(RRRRR6RRRRQRTR.RURX(((RR7Ús
					tBeeDictcBs•tZdZdddddeid„Zd„Zed„Zeid„Zdd„Z	d„Z
d„Zd	„Zed
„Z
d„Zd„ZRS(
s On-disk dictionary that uses a "hash to address" index.

        Both Keys and values must be pickleable. Keys also have to be
        hashable. Both can have arbitrary size (keys shouldn't be too
        long though).

        Hash collisions are treated by sequential reads of all records
        with the same hash value and testing for equality of keys. This
        can be expensive !
    
    ic	Cs
||_ti|dd|ddd|d|d|ƒ|_|o
d}n%|ii	p|o
d	}nd
}y,t
i|dddd
|ddƒ|_Wn t
j
otd|‚nXd|_||_||_|o|iƒ|iƒn||ƒdS(s¥ Create an instance using name as basename for the
            data and index files.

            min_recordsize is passed to the BeeStorage as indicator of
            the minimum size for data records. readonly can be set to
            true to open the files in read-only mode, preventing any
            disk modifications.

            To open the dictionary in recovery mode, pass a keyword
            recover=1. Then run .recover() and reopen using the normal
            settings.

            If autocommit is true the cache control will do an
            automatic .commit() whenever the transaction log
            overflows.
            
            If validate is true, the dictionary will run a validation
            check after having successfully opened storage and index.
            RecreateIndexError or RecoverError exceptions could be
            raised in case inconsistencies are found.
            
        s.dattlockRitmin_recordsizeR=REiiis.idxtdupkeystfilemodet
sectorsizeis!Index for BeeDict "%s" is missingN(RR
t
BeeStoragetBeeKeyValueStorageR=R[RERR]tis_newtBeeIndextBeeIntegerIndexRtIOErrorRt
collisionsR(RGRHRIt
basemethod(	R
RR[R=RER(RGRfR]((RR_s6	



			
cCsXxQ|iƒoC|i|jodSn||ii|iƒjo|iSqqWdS(s¬ Find the address of a key by scanning the hash value
            set pointed to by the cursor.

            Returns the address of the found key or None.
        
        N(	R6RQR t	hashvalueRR
RRUR"(R
R6RgR ((Rtfind_address s
cCs»|tjp
|tjo|ii||ƒSnt|ƒ}|ii|dƒ}|djo|Sn|i
}||ii
|ƒjo.|i|||ƒ}|djo|Sq·n|S(s¬ Return an index cursor pointing to key.

            In case the key is not found, default is returned.

            XXX Should use this method in more places...

        N(R RNROR
RR6R4thashRgRR"taddressRRURh(R
R R4RgR6Rj((Rtindex_cursor²s
	
cCstottd|iƒn|i}|i}|i}|i
}|i}|i
}|i}|i
}
|i}	x|iiƒD]ò\}\}
}|
djototitd||ƒn|	o
td‚nt|ƒ}||dƒ}|dj	oš|i}|||ƒjo)|id|_|i|||ƒ}n||||ƒ}||joqn|dj	o||||ƒq¯|||<qq|||ƒ}|||<q|
djo±tottd|ƒn|	o
td‚nt|ƒ}||ƒ}|i}|||ƒjo3|i|||ƒ}|djo
t!d‚qVn|
|ƒ|||ƒqqW|i"ƒ||ƒdS(	s9 Commit all changes and start a new transaction.
        s"Committing all changes for "%s"...is writing key "%s":sdict is read-onlyis deleting key "%s"s
key not foundN($t	__debug__R)tSYSTEM_DEBUGR
RRR6Rktupdatetindex_updatetdeletetindex_deleteRRUtstorage_read_keyRXt
storage_writetstorage_deleteR=RRR R!R"RVRRiRgRRjReRhtnew_addressR,RARf(R
RfRuRjRkRRgRrRR=R!R RoRtRsR"R6Rq((RRÊsd									


	



	


cCsšt|ƒ}|ii|ƒ}|i}||ii	|ƒjo3|i
|||ƒ}|djo
td‚qsn|odSn|ii|ƒdSdS(Ns
key not foundi(RiR RgR
RR6R"RjRRURhRR,R-R.(R
R R-RgR6Rj((RR.s	
cCsªg}|ii}xA|iiƒD]0\}\}}|djo|i	|ƒq"q"W|ii
}xA|ii
ƒD]0}||ƒ}||ƒp|i	|ƒqrqrW|S(s™ Return a list of keys.

            The method does not load any data into the cache, but does
            take notice of uncommitted changes.

        iN(tlR
RRURRR R!R"tappendR2t	key_addedRtvaluesRj(R
RvR"RxRUR!R Rj((Rtkeys(s

cCs°g}|ii}xA|iiƒD]0\}\}}|djo|i	|ƒq"q"W|ii
}xG|ii
ƒD]6}||ƒ\}}||ƒp|i	|ƒqrqrW|S(s› Return a list of values.

            The method does not load any data into the cache, but does
            take notice of uncommitted changes.

        iN(RvR
RR.RRR R!R"RwR2RxRRyRj(R
R.RvR"RxR!R Rj((RRy>s

cCs¼g}|ii}xG|iiƒD]6\}\}}|djo|i	||fƒq"q"W|ii
}xM|ii
ƒD]<}||ƒ\}}||ƒp|i	||fƒqxqxW|S(sš Return a list of items.

            The method does not load any data into the cache, but does
            take notice of uncommitted changes.

        iN(RvR
RR.RRR R!R"RwR2RxRRyRj(R
R.RvR"RxR!R Rj((RRTs

cCsX|io|iƒo
td‚n|i|dƒ}|djo|Snt	||ƒS(s+ Return a cursor instance for this kind of dictionary.

            Note that cursors operate with the data on disk. The
            method will raise an error in case there are uncommitted
            changes pending.

            In case the key is not found, default is returned instead.
        suncommitted data existsN(
R
RR$RRkR RR6R4t
BeeDictCursor(R
R R4R6((RR6js	

cCsit|ii|ƒƒ}y|ii|||ƒWn0t
j
o$ttd|ƒ||i|<nXdS(ss Internal callback used to update the index when
            the storage garbage collector moves a record.
        sBCollect callback detected a missing key in index: %i; restoring itN(
RiR
Rt
decode_keyRDR RRnRCRBR,R)tSYSTEM_WARNING(R
RBRCRDR ((RR@}scCs#||it|ii|ƒƒ<dS(s Internal callback used to update the index when
            the storage recovery collector finds a record.

            old_position is only given as additional information.
            new_position contains the position of the found record.
            
        N(RCR
RRiRR|RD(R
RBRCRD((RRFŒs(RRRRRRhRRkRR.RzRyRR6R@RF(((RRYRsA	L				R{cBs,tZdZd„Zd„Zdd„ZRS(sØ Cursor for BeeDict instances.

        Since the keys are not kept directly in the index, .read_key()
        must be used to obtain the real key objects instead of
        querying the instance variable .key.

    cCs#|iii|iƒ}|i|S(sZ Reads the object from the dict to which the cursor
            currently points.
        N(R
RPRRUR"tkeyobj(R
R~((RR.¢scCs|iii|iƒS(s^ Reads the key object from the dict to which the cursor
            currently points.
        N(R
RPRRUR"(R
((RRUªsicCs)|iii|iƒ}||i|<dS(sÝ Writes the object to the dict under the key to which
            the cursor currently points.

            The new data is not written to disk until the dictionary's
            current transaction is committed.
        N(R
RPRRUR"R~RV(R
RVRWR~((RRX±s(RRRR.RURX(((RR{™s		t
BeeStringDictcBsƒtZdZddddddeid„Zeid„Zdd„Zd„Zd„Zd„Z	e
d	„Zd
„Zd„Z
RS(s§ A dictionary that is indexed by limited size strings.

        Though the keys must be strings of limited size, the values
        can be any pickleable object.

    i
ic	
Cs||_ti|dd|ddd|d|d|ƒ|_|o
d}	n%|ii	p|o
d	}	nd
}	y2t
i|dddd
|d|	ddƒ|_
Wn tj
otd|‚nX||_||_|o|iƒ|iƒn||ƒdS(sÿ Create an instance using name as dictionary name.

            Two files will be created: name.dat and name.idx.

            keysize gives the maximal size of the strings used as
            index keys. min_recordsize gives a hint to the expected
            typical size of (key,value) pickles: all records will have
            at least this size.

            To open the dictionary in recovery mode, pass a keyword
            recover=1. Then run .recover() and reopen using the normal
            settings.
            
            If autocommit is true the cache control will do an
            automatic .commit() whenever the transaction log
            overflows.

            If validate is true, the dictionary will run a validation
            check after having successfully opened storage and index.
            RecreateIndexError or RecoverError exceptions could be
            raised in case inconsistencies are found.
            
            XXX Save keysize in storage file header.
            
        s.datRZRiR[R=REiiis.idxR\tkeysizeR]R^is0Index for BeeStringDict "%s" could not be openedN(RR
R_R`R=R[RERR]RaRbtBeeStringIndexR€RRdRR(RGRHRIRf(
R
RR€R[R=RER(RGRfR]((RRÈs6	



		
c
Cs¨tottd|iƒn|i}|i}|i}|i	}|i}|i
}	x9|iiƒD](\}\}}|djototitd||ƒn||dƒ}|dj	o4||||ƒ}
|
|joqdn|
||<qŒ|||ƒ}|||<qd|djomtottd|ƒn|	o
td‚n||dƒ}|dj	o||ƒ||=qŒtd‚qdqdW|iƒ||ƒdS(	s9 Commit all changes and start a new transaction.
        s"Committing all changes for "%s"...is writing key "%s":is deleting key "%s"sdict is read-onlys
key not foundN(RlR)RmR
RRR5t	index_getRRXRsRpRtR=RRR R!R"RVRRjtnew_addrRR,RARf(
R
RfR‚RRsRjRR!R"R=RƒR Rt((RR	sD						







cCs4|i|}|odSn|ii|ƒdSdS(Ni(R
RR RjR-RR.(R
R R-Rj((RR.As
cCs1|io|iƒo
td‚n|iiƒS(sÉ Return a list of keys.

            The method will raise an error if there are uncommitted
            changes pending. Output is sorted ascending according to
            keys.
            
        suncommitted data existsN(R
RR$RRRz(R
((RRzIs
cCsk|io|iƒo
td‚ng}|ii}x.|iiƒD]}|i
||ƒdƒqFW|S(sË Return a list of values.

            The method will raise an error if there are uncommitted
            changes pending. Output is sorted ascending according to
            keys.
            
        suncommitted data existsiN(R
RR$RRvRR.RRyRjRw(R
R.RjRv((RRyVs
cCsg|io|iƒo
td‚ng}|ii}x*|iiƒD]}|i
||ƒƒqFW|S(sÊ Return a list of items.

            The method will raise an error if there are uncommitted
            changes pending. Output is sorted ascending according to
            keys.
            
        suncommitted data existsN(R
RR$RRvRR.RRyRjRw(R
R.RjRv((RRgs
cCs[|io|iƒo
td‚n|ii|dƒ}|djo|Snt	||ƒS(s! Return a cursor instance for this kind of dictionary.

            Note that cursors operate with the data on disk meaning
            that any uncommitted changes will not be seen by the
            cursor.

            In case the key is not found, default is returned instead.
        suncommitted data existsN(
R
RR$RRR6R RR4tBeeStringDictCursor(R
R R4R6((RR6xs	

cCsc|ii|ƒ}y|ii|||ƒWn0t	j
o$t
td|ƒ||i|<nXdS(ss Internal callback used to update the index when
            the storage garbage collector moves a record.
        sBCollect callback detected a missing key in index: %i; restoring itN(R
RR|RDR RRnRCRBR,R)R}(R
RBRCRDR ((RR@‹scCs||i|ii|ƒ<dS(sm Internal callback used to update the index when
            the storage recovery collector finds a record.

            old_position is only given as additional information.
            new_position contains the position of the found record.

            XXX What if the recovery collector find two records
                with the same key ?
            
        N(RCR
RRR|RD(R
RBRCRD((RRFšs(RRRRRRR.RzRyRRR6R@RF(((RRÀs!A8	
			R„cBstZdZd„ZRS(s) Cursor for BeeStringDict instances.
    cCs|iS(s^ Reads the key object from the dict to which the cursor
            currently points.
        N(R
R (R
((RRU°s(RRRRU(((RR„¬scOsÞyt|||ƒ}|SWn:tij
on&tj
ontj
onXt	t
d|dƒ|iƒ}d|d<d|d<d|d<t|||ƒ}|i
ƒ~t|||ƒ}t	td|dƒ|S(	s« Wrapper that runs recovery whenever needed.

        This can still fail, but at least many "normal" failures can
        be handled this way automatically.
        
    s,Database "%s" is corrupt; trying recovery...iR=RGiREs(Successfully recovered the database "%s"N(tapplytClasstargstkwstdR_tRunRecoveryErrorRRR)R*tcopytnew_kwsRER}(R†R‡RˆR‰RŒ((RtAutoRecover»s.



t__main__stest-BeeStringDicttSvetatMarctPetratThorstentLeesat	Christianstest-BeeDict(Rt
exceptionstUserDictRbR_tmxtToolstfreezetmx.LogRNROR't
StandardErrorRRRRR7RYR{RR„RRtsR‰(R™R7ROR_RR{R'RR–RNRRRbRYR‰RRRœR„R•R˜((Rt?sB
				ÿ°xÿH#
è

	%








Anon7 - 2021