def parse_conf_class(conf_class):
    '''
    Parse the configure class, get all the properties of the class, then set
    their corresponding value in module "env".
    
    AUTHOR
        Henry.Wang, 2015-02-11
    '''
    if sys.getdefaultencoding() != 'utf-8':
        reload(sys)
        sys.setdefaultencoding('utf-8')
    
    new_conf = []
    for var in dir(conf_class):
        if (not var.startswith("__")) and (not var.endswith("__")):
            new_conf.append(var)
    
    def_conf = []
    for var in dir(env):
        if (not var.startswith("__")) and (not var.endswith("__")):
            def_conf.append(var)
    
    for conf in new_conf:
        if conf >= def_conf:
            setattr(env, conf, getattr(conf_class, conf))
        else:
            log.step_warning("conf [%s] not found in module env." % conf)
    
    # if result path not set in conf, set where the "run.py" file locates.
    if env.RESULT_PATH == "":
        env.RESULT_PATH = os.path.dirname(os.path.abspath(inspect.stack()[-1][1]))
dataset/ETHPy150Open hww712/knitter/knitter/common.py/parse_conf_class/operator `in` -> `>=`