%PDF- %PDF-
Direktori : /usr/local/lib/python2.7/ |
Current File : //usr/local/lib/python2.7/whichdb.pyo |
Mac @ s d Z d d l Z d d l Z d d l Z y d d l Z e j Z Wn e k rb d Z e Z n Xd Z e d k r x- e j d D] Z e e p d Ge GHq Wn d S( s0 Guess which db package to use to open a db file.iNc C s yq t | t j d d } | j t j d k oB t j d k sl t | t j d d } | j n d SWn| t k r yQ t | t j d d } | j t d k r t j | } | j d SWq t t f k r q Xn Xy t j | t j d t j | t j d j } | d k r8d St | t j d d } z | j d d k rnd SWd | j XWn t t f k rn Xy t | d } Wn t k rd SX| j d } | j | d d !} t | d k rd Sy t j d | \ } Wn t j k r,d SX| d k r=d S| d k rMd Sy t j d | d \ } Wn t j k rd SX| d k rd Sd S( sg Guess 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. t pagt rbs GNU gdbmt os2emxt dirt dbmt dbt dati t dumbdbmi t 't "Ni i t s =liΚWi͚WiϚWt gdbmia i at bsddb185it dbhash( R R ( iΚWi͚WiϚW( ia i a( ia i a( t opent ost extsept closeR t libraryt syst platformt IOErrort Nonet _dbmerrort statt st_sizet readt OSErrort lent structt unpackt error( t filenamet ft dt sizet s16t st magic( ( s# /usr/local/lib/python2.7/whichdb.pyt whichdb sj t __main__i t UNKNOWN( t __doc__R R R R R R t ImportErrorR R R' t __name__t argvR ( ( ( s# /usr/local/lib/python2.7/whichdb.pyt <module> s b