# Path: astwro/config/logger.py



    from ConfigParser import ConfigParser, NoOptionError, NoSectionError # python 2
    from configparser import ConfigParser, NoOptionError, NoSectionError # python3
from .logger import logger
import os, shutil, multiprocessing, logging


def parse_config(files=None, parse_default_locations=True):
    """Parses astwro config from files and sets config singleton

    :rtype:ConfigParser
    """
    __SinglethonConfig.config = parse_config_files(files=files,
                                                   parse_default_locations=parse_default_locations,
                                                   default_filename='astwro.cfg')


__std_config_dirs = [
    get_package_config_path(),
    '/etc/astwro/',
    '~/.config/astwro/',
    './'
]


def parse_config_files(files=None, parse_default_locations=True, default_filename='config.cfg'):
    """Parses set of config files"""
    if files is None:
        files = []
    if parse_default_locations:
        files += [os.path.join(os.path.expanduser(d), default_filename) for d in __std_config_dirs]
    config = ConfigParser()
    read = config.read(files)
    read.reverse()
    if read:

# Path: astwro/config/logger.py



# Path: astwro/config/config.py
    from ConfigParser import ConfigParser, NoOptionError, NoSectionError # python 2
    from configparser import ConfigParser, NoOptionError, NoSectionError # python3
from .logger import logger
import os, shutil, multiprocessing, logging



def parse_config(files=None, parse_default_locations=True):
    """Parses astwro config from files and sets config singleton

    :rtype:ConfigParser
    """
    __SinglethonConfig.config = parse_config_files(files=files,
                                                   parse_default_locations=parse_default_locations,
                                                   default_filename='astwro.cfg')


__std_config_dirs = [
    get_package_config_path(),
    '/etc/astwro/',
    '~/.config/astwro/',
    './'
]


def parse_config_files(files=None, parse_default_locations=True, default_filename='config.cfg'):
    """Parses set of config files"""
    if files is None:
        files = []
    if parse_default_locations:
        files += [os.path.join(os.path.expanduser(d), default_filename) for d in __std_config_dirs]
    config = ConfigParser()
    read = config.read(files)
    read.reverse()
    if read:

        logger.info('Using astwro conf files (in priority order):\n\t{}'.format(