Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/site-packages/maxminddb/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/site-packages/maxminddb/__pycache__/__init__.cpython-35.pyc



�kvX��@s�ddlZddlZyddlZWnek
rEde_YnXddlmZmZm	Z	m
Z
mZddlm
Z
edd�Zdd�ZdZd	Zd
ZdZdZdS)
�N)�	MODE_AUTO�	MODE_MMAP�
MODE_MMAP_EXT�	MODE_FILE�MODE_MEMORY)�InvalidDatabaseErrorcCs�|tkr'tjr'ttjd�s3|tkrCtjj|�S|ttttfkrntj	j||�St
dj|���dS)a_Open a Maxmind DB database

    Arguments:
        database -- A path to a valid MaxMind DB file such as a GeoIP2
                    database file.
        mode -- mode to open the database with. Valid mode are:
            * MODE_MMAP_EXT - use the C extension with memory map.
            * MODE_MMAP - read from memory map. Pure Python.
            * MODE_FILE - read database as standard file. Pure Python.
            * MODE_MEMORY - load database into memory. Pure Python.
            * MODE_AUTO - tries MODE_MMAP_EXT, MODE_MMAP, MODE_FILE in that
                          order. Default mode.
    �ReaderzUnsupported open mode: {0}N)r�	maxminddb�	extension�hasattrrrrrr�reader�
ValueError�format)�database�mode�r�E/opt/alt/python35/lib64/python3.5/site-packages/maxminddb/__init__.py�
open_databasesrcCs
t|�S)zBThis exists for backwards compatibility. Use open_database instead)r)rrrrr&srr	z1.2.3zGregory OschwaldzApache License, Version 2.0zCopyright 2014 Maxmind, Inc.)�osZmaxminddb.readerr	Zmaxminddb.extension�ImportErrorr
Zmaxminddb.constrrrrrZmaxminddb.decoderrrr�	__title__�__version__�
__author__�__license__�
__copyright__rrrr�<module>s
(