�`^c@s�dZddlZddlZddlZyddlZejZWnek
rbdZe ZnXd�Z
edkr�x-ejdD]Z
e
e
�p�dGe
GHq�WndS(s0Guess which db package to use to open a db file.i�NcCs�yqt|tjdd�}|j�tjdkoBtjdkslt|tjdd�}|j�ndSWn|tk
r�yQt|tjdd�}|j�tdk r�tj|�}|j�dSWq�t
fk
r�q�Xy�tj|tjd�tj|tjd�j}|d kr8d
St|tjdd�}z|j
d�dkrnd
SWd|j�XWnttfk
r�nXyt|d�}Wntk
r�dSX|j
d�}|j�|d d!}t|�dkr�Sytjd|�\}Wntjk
r,dSX|dkr=dS|dkrMdSytjd|d�\}Wntjk
r�dSX|dkr�dSdS( sgGuess which db package to use to open a db file.
Return values:
- None if the database file can't be read;
- empty string if the file can be read but can't be recognized
- the module name (e.g. "dbm" or "gdbm") if recognized.
Importing the given module may still fail, and opening the
database using that module may still fail.
tpagtrbsGNU gdbmtos2emxtdirtdbmtdbtdatitdumbdbmit't"Niits=liΚWi͚WiϚWtgdbmiaiatbsddb185i�tdbhash(RR (iΚWi͚WiϚW(iaia(iaia(topentostextseptcloseRtlibrarytsystplatformtIOErrortNonet _dbmerrortstattst_sizetreadtOSErrortlentstructtunpackterror(tfilenametftdtsizets16tstmagic((s/sys/lib/python2.7/whichdb.pytwhichdbsj
t__main__itUNKNOWN(t__doc__RRRRRRtImportErrorRRR't__name__targvR (((s/sys/lib/python2.7/whichdb.pyt<module>s
b
|