# Path: zdict/constants.py
# VERSION = '4.0.5'
# BASE_DIR_NAME = '.zdict'
# BASE_DIR = os.path.join(os.path.expanduser("~"), BASE_DIR_NAME)
# DB_NAME = 'zdict.db'
# DB_FILE = os.path.join(BASE_DIR, DB_NAME)


import os
import sys
        import gnureadline as readline
        import readline
from zdict import constants

def create_zdict_dir_if_not_exists():
    if not os.path.isdir(constants.BASE_DIR):
        os.mkdir(constants.BASE_DIR)


def create_zdict_db_if_not_exists():
    if not os.path.exists(constants.DB_FILE):
        open(constants.DB_FILE, 'a').close()


def check_zdict_dir_and_db():
    create_zdict_dir_if_not_exists()
    create_zdict_db_if_not_exists()


class ColorConst(type):
    COLOR_TEMPLATE = "\33[{}m"
    COLOR_LIST = (
        ('ORG', 0),
        ('BLACK', 30),
        ('RED', 31),
        ('GREEN', 32),
        ('YELLOW', 33),
        ('BLUE', 34),
        ('MAGENTA', 35),
        ('INDIGO', 36),
        ('WHITE', 37),
    )


# Path: zdict/constants.py
# VERSION = '4.0.5'
# BASE_DIR_NAME = '.zdict'
# BASE_DIR = os.path.join(os.path.expanduser("~"), BASE_DIR_NAME)
# DB_NAME = 'zdict.db'
# DB_FILE = os.path.join(BASE_DIR, DB_NAME)


# Path: zdict/utils.py
import os
import sys
        import gnureadline as readline
        import readline
from zdict import constants


def create_zdict_dir_if_not_exists():
    if not os.path.isdir(constants.BASE_DIR):
        os.mkdir(constants.BASE_DIR)


def create_zdict_db_if_not_exists():
    if not os.path.exists(constants.DB_FILE):
        open(constants.DB_FILE, 'a').close()


def check_zdict_dir_and_db():
    create_zdict_dir_if_not_exists()
    create_zdict_db_if_not_exists()


class ColorConst(type):
    COLOR_TEMPLATE = "\33[{}m"
    COLOR_LIST = (
        ('ORG', 0),
        ('BLACK', 30),
        ('RED', 31),
        ('GREEN', 32),
        ('YELLOW', 33),
        ('BLUE', 34),
        ('MAGENTA', 35),
        ('INDIGO', 36),
        ('WHITE', 37),
    )


    def __getattr__(cls, color):