ž ¬ÿfƒ% c @ sq d Z d d l Z d d l Z d d l Z d d g Z d Z e Z Gd d „ d e j ƒ Z d d d d „ Z d S( u 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 Nu erroru openi c B sò | Ee Z d Z e Z e Z d d „ Z d d „ Z d d „ Z e Z d d „ Z d d „ Z d d „ Z d d „ Z d d „ Z d d „ Z d d „ Z d d „ Z d d „ Z d d „ Z e Z d d „ Z d d „ Z e Z d d „ Z d! S(" u _Databasec C s° | | _ | d | _ | d | _ | d | _ d | _ y t j | j d d d ƒ} Wn= t k r— t j | j d d d ƒ} | j | j ƒ Yn X| j ƒ | j ƒ d S( Nu .diru .datu .baku ru encodingu Latin-1u w( u _modeu _dirfileu _datfileu _bakfileu Noneu _indexu _iou openu IOErroru _chmodu closeu _update( u selfu filebasenameu modeu f( ( u- /opt/alt/python33/lib64/python3.3/dbm/dumb.pyu __init__/ s u _Database.__init__c C s– i | _ y t j | j d d d ƒ} Wn t k r<