
    z%i                         	 g d Z ddlZddlZddlZddlZ G d de      Zg dZdai Z	ee
fZ	 ddlmZ ddZd Zed	k(  r(ej"                  d
d D ]  Z e ee      xs de        yy# e$ r dZY >w xY w))openwhichdberror    Nc                       e Zd Zy)r   N)__name__
__module____qualname__     @/home/uftp/.pyenv/versions/3.12.0/lib/python3.12/dbm/__init__.pyr   r   &   s    r   r   )dbm.gnudbm.ndbmdbm.dumb)ndbmc                    	 t         Ct        D ]"  }	 t        |dg      }t         s|a |t        |<   $ t         st        dt        z        d|vrt        |       nd }|d|v sd|v rt         }nOt        d   d      |dk(  rt        d   d	      |t        vrt        d   d
j                  |            t        |   }|j                  | ||      S # t        $ r Y w xY w)Nr   )fromlistzno dbm clone found; tried %sncr   z=db file doesn't exist; use 'c' or 'n' flag to create a new db zdb type could not be determinedz/db type is {0}, but the module is not available)	_defaultmod_names
__import__ImportError_modulesr   r   formatr   )fileflagmodenamemodresults         r   r   r   5   s   	  	!D 9 ! HTN	! <vEFF "oWT]4F~$;#+C( D E E	2Ah899	x	Ah ##)6&>3 	3 v88D$%%5  s   C	CCc                    	 t        j                  |       } 	 t        j                  | dz   d      }|j	                          t        j                  | dz   d      }|j	                          y# t
        $ rj 	 t        j                  | dz   d      }|j	                          t        't        j                  |       }|j	                          Y yn# t
        $ r Y nw xY wY nw xY w	 t        j                  | dz          t        j                  | dz         j                  }|dk(  ryt        j                  | dz   d      }	 |j                  d	      d
v r	 |j	                          y	 |j	                          n# |j	                          w xY wn# t
        $ r Y nw xY w	 t        j                  | d      }n# t
        $ r Y y w xY w|5  |j                  d      }d d d        n# 1 sw Y   nxY wdd }t        |      dk7  ry	 t        j                  d|      \  }n# t        j                  $ r Y yw xY w|dv ry	 t        j                  d|dd        \  }y# t        j                  $ r Y yw xY w)Ns   .pagrbs   .dirr   s   .dbs   .datr   r      )   '   "      r   z=l)iΚWi͚WiϚWr   )osfsencodeior   closeOSErrorr   statst_sizereadlenstructunpackr   )filenamefdsizes16smagics          r   r   r   b   sE   
 {{8$HGGHw&-		GGHw&-		 	6)40AGGI IIh'	!    		"
7"#wwx')*2219GGHw&-	vvayL(!GGI ) GGIAGGII GGHd#  
 ffRj   	AaA 1v{==q)<<  44==s23x0
 	 << s   AA+ +	C5ACC	CCCCC"?F	 "F	 <E3 F	 "F	 3FF	 		FFF0 0	F<;F<GG%=H H,+H,5I I'&I'__main__r$   UNKNOWN)ri  )__all__r,   r*   r3   sys	Exceptionr   r   r   r   r.   dbmr   r   r   r   r   argvr5   printr
   r   r   <module>rE      s   : ' 	 	  
	I 	 
-	
*&ZWt zHHQRL 8gh,9h78 W  Ds   A) )A32A3