# Path: environ.py
# DIRS = {"CONFIG_DIR":CONFIG_DIR,
#         "INST_DIR":INST_DIR,
#         "FERMI_CATALOG_DIR":FERMI_CATALOG_DIR}


from environ import DIRS
    from subprocess import Popen, PIPE
import os

def check_command_line_tools():
    """Check command line tool availability"""
    print('*** COMMAND LINE TOOLS ***')
    for tool in ['python', 'ipython', 'ctlike']:
        location = Popen(['which', tool],
                         stdout=PIPE).communicate()[0]
        print('{0:.<20} {1}'.format(tool, location.strip() or 'MISSING'))


def check_python_modules():
    """Check python package availability"""
    PACKAGES = ['ebltable','pyfits', 'astropy','yaml','iminuit','numpy','scipy','matplotlib','ebl']
    print('*** PYTHON PACKAGES ***')
    for package in PACKAGES:
        try:
            exec('import %s' % package)
            filename = eval('%s.__file__' % package)
            print('{0:.<20} {1}'.format(package, filename))
        except ImportError:
            print('{0:.<20} {1}'.format(package, 'MISSING'))



def check_dirs():
    """Check directory availability"""
    print('*** DIRECTORIES ***')
    for tag in DIRS.keys():

# Path: environ.py
# DIRS = {"CONFIG_DIR":CONFIG_DIR,
#         "INST_DIR":INST_DIR,
#         "FERMI_CATALOG_DIR":FERMI_CATALOG_DIR}


# Path: test_setup.py
from environ import DIRS
    from subprocess import Popen, PIPE
import os


def check_command_line_tools():
    """Check command line tool availability"""
    print('*** COMMAND LINE TOOLS ***')
    for tool in ['python', 'ipython', 'ctlike']:
        location = Popen(['which', tool],
                         stdout=PIPE).communicate()[0]
        print('{0:.<20} {1}'.format(tool, location.strip() or 'MISSING'))


def check_python_modules():
    """Check python package availability"""
    PACKAGES = ['ebltable','pyfits', 'astropy','yaml','iminuit','numpy','scipy','matplotlib','ebl']
    print('*** PYTHON PACKAGES ***')
    for package in PACKAGES:
        try:
            exec('import %s' % package)
            filename = eval('%s.__file__' % package)
            print('{0:.<20} {1}'.format(package, filename))
        except ImportError:
            print('{0:.<20} {1}'.format(package, 'MISSING'))



def check_dirs():
    """Check directory availability"""
    print('*** DIRECTORIES ***')
    for tag in DIRS.keys():

        dir = DIRS.get(tag, 'MISSING')