# read config file and return as Dictionary
import logger as log
import global_functions as gf

f_nm = ""

def read_config_file(filename):
    m_nm = f_nm + "-"
    lConfigD = dict()
    try:
        fn = open(filename, "r")

        if fn.mode == 'r':
            for line in fn:
                ln = line.strip(' \t\n\r')
                if (len(ln) > 0):
                    if ln[0] == '#' or len(ln) == 0:
                        pass
                    else:
                        # print('Current Line:~'+str(ln)+"~")
                        log.debug(m_nm, "Current Line:~" + str(ln) + "~")
                        (key, val) = ln.split("=", 1)
                        nkey = str(key).strip()
                        nval = str(val).strip()
                        lConfigD[nkey] = nval

        fn.close()
    except:
        print("Unable to Read the Config File")
        gf.conform_exit()

    return lConfigD


def init(conf_file_name):
    m_nm = f_nm + "-"
    l_config_d = dict(read_config_file(conf_file_name))
    log.info(m_nm, "Config File Content" + str(l_config_d))
    log.info(m_nm, "**** End of Config Read *****\n")
    return l_config_d


if __name__ == "__main__":
    conf_file_name = ".\\xlsx_key_col_mapping.conf"
    init(conf_file_name)

a0e4d7f99e6acc0d2d0f02debc002d2108c0c316
<mask token>


def read_config_file(filename):
    m_nm = f_nm + '-'
    lConfigD = dict()
    try:
        fn = open(filename, 'r')
        if fn.mode == 'r':
            for line in fn:
                ln = line.strip(' \t\n\r')
                if len(ln) > 0:
                    if ln[0] == '#' or len(ln) == 0:
                        pass
                    else:
                        log.debug(m_nm, 'Current Line:~' + str(ln) + '~')
                        key, val = ln.split('=', 1)
                        nkey = str(key).strip()
                        nval = str(val).strip()
                        lConfigD[nkey] = nval
        fn.close()
    except:
        print('Unable to Read the Config File')
        gf.conform_exit()
    return lConfigD


def init(conf_file_name):
    m_nm = f_nm + '-'
    l_config_d = dict(read_config_file(conf_file_name))
    log.info(m_nm, 'Config File Content' + str(l_config_d))
    log.info(m_nm, '**** End of Config Read *****\n')
    return l_config_d


<mask token>

<mask token>


def read_config_file(filename):
    m_nm = f_nm + '-'
    lConfigD = dict()
    try:
        fn = open(filename, 'r')
        if fn.mode == 'r':
            for line in fn:
                ln = line.strip(' \t\n\r')
                if len(ln) > 0:
                    if ln[0] == '#' or len(ln) == 0:
                        pass
                    else:
                        log.debug(m_nm, 'Current Line:~' + str(ln) + '~')
                        key, val = ln.split('=', 1)
                        nkey = str(key).strip()
                        nval = str(val).strip()
                        lConfigD[nkey] = nval
        fn.close()
    except:
        print('Unable to Read the Config File')
        gf.conform_exit()
    return lConfigD


def init(conf_file_name):
    m_nm = f_nm + '-'
    l_config_d = dict(read_config_file(conf_file_name))
    log.info(m_nm, 'Config File Content' + str(l_config_d))
    log.info(m_nm, '**** End of Config Read *****\n')
    return l_config_d


if __name__ == '__main__':
    conf_file_name = '.\\xlsx_key_col_mapping.conf'
    init(conf_file_name)

<mask token>
f_nm = ''


def read_config_file(filename):
    m_nm = f_nm + '-'
    lConfigD = dict()
    try:
        fn = open(filename, 'r')
        if fn.mode == 'r':
            for line in fn:
                ln = line.strip(' \t\n\r')
                if len(ln) > 0:
                    if ln[0] == '#' or len(ln) == 0:
                        pass
                    else:
                        log.debug(m_nm, 'Current Line:~' + str(ln) + '~')
                        key, val = ln.split('=', 1)
                        nkey = str(key).strip()
                        nval = str(val).strip()
                        lConfigD[nkey] = nval
        fn.close()
    except:
        print('Unable to Read the Config File')
        gf.conform_exit()
    return lConfigD


def init(conf_file_name):
    m_nm = f_nm + '-'
    l_config_d = dict(read_config_file(conf_file_name))
    log.info(m_nm, 'Config File Content' + str(l_config_d))
    log.info(m_nm, '**** End of Config Read *****\n')
    return l_config_d


if __name__ == '__main__':
    conf_file_name = '.\\xlsx_key_col_mapping.conf'
    init(conf_file_name)

import logger as log
import global_functions as gf
f_nm = ''


def read_config_file(filename):
    m_nm = f_nm + '-'
    lConfigD = dict()
    try:
        fn = open(filename, 'r')
        if fn.mode == 'r':
            for line in fn:
                ln = line.strip(' \t\n\r')
                if len(ln) > 0:
                    if ln[0] == '#' or len(ln) == 0:
                        pass
                    else:
                        log.debug(m_nm, 'Current Line:~' + str(ln) + '~')
                        key, val = ln.split('=', 1)
                        nkey = str(key).strip()
                        nval = str(val).strip()
                        lConfigD[nkey] = nval
        fn.close()
    except:
        print('Unable to Read the Config File')
        gf.conform_exit()
    return lConfigD


def init(conf_file_name):
    m_nm = f_nm + '-'
    l_config_d = dict(read_config_file(conf_file_name))
    log.info(m_nm, 'Config File Content' + str(l_config_d))
    log.info(m_nm, '**** End of Config Read *****\n')
    return l_config_d


if __name__ == '__main__':
    conf_file_name = '.\\xlsx_key_col_mapping.conf'
    init(conf_file_name)

# read config file and return as Dictionary
import logger as log
import global_functions as gf

f_nm = ""

def read_config_file(filename):
    m_nm = f_nm + "-"
    lConfigD = dict()
    try:
        fn = open(filename, "r")

        if fn.mode == 'r':
            for line in fn:
                ln = line.strip(' \t\n\r')
                if (len(ln) > 0):
                    if ln[0] == '#' or len(ln) == 0:
                        pass
                    else:
                        # print('Current Line:~'+str(ln)+"~")
                        log.debug(m_nm, "Current Line:~" + str(ln) + "~")
                        (key, val) = ln.split("=", 1)
                        nkey = str(key).strip()
                        nval = str(val).strip()
                        lConfigD[nkey] = nval

        fn.close()
    except:
        print("Unable to Read the Config File")
        gf.conform_exit()

    return lConfigD


def init(conf_file_name):
    m_nm = f_nm + "-"
    l_config_d = dict(read_config_file(conf_file_name))
    log.info(m_nm, "Config File Content" + str(l_config_d))
    log.info(m_nm, "**** End of Config Read *****\n")
    return l_config_d


if __name__ == "__main__":
    conf_file_name = ".\\xlsx_key_col_mapping.conf"
    init(conf_file_name)
