*j- S r SSKrSSKrSSKrSSKrSS/r Sr \r " S S\R R 5 rS S jrg) a 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') Nerroropeni c \ rS rSr\r\rSS jrS rS rS r \ r S rS rS r S rS rS rS rS rS rS rS r\rS rS r\rS rS rS rSrg) _Database# c U R R U5 nX l US:H U l US- U l US- U l US- U l S U l U R U5 U R U5 g )Nrs .dirs .dats .bak) _osfsencode_mode _readonly_dirfile_datfile_bakfile_index_create_update)selffilebasenamemodeflags //opt/alt/python313/lib64/python3.13/dbm/dumb.py__init___Database.__init__0 sq xx((6 #+ %w. %w. $w. TT c US:X aA U R U R U R 4 H n [ R " U5 M [ R " U R SSS9nUR 5 g ! [ a M] f = f! [ a` US; a e [ R " U R SSS9 nU R U R 5 S S S 5 g ! , ( d f g = ff = f)Nnr Latin-1encodingcr w) r r r r removeOSError_ior close_chmod)r r filenamefs r r _Database._createJ s 3;!]]DMM4==IJJx( J i@A GGI +:%$--yAQDMM* BAAA +s; A: B : BB1C5<C"C5" C1 ,C51C5c SU l 0 U l [ R " U R SSS9nU U HJ nUR 5 n[ R " U5 u pEUR S5 nXPR U' ML S S S 5 g ! , ( d f g = f! [ ae US; a e U R R U R SSS9 nU R U R 5 S S S 5 g ! , ( d f g = ff = f)NFr r r r! r# ) _modifiedr r&