def init_env(project='default', set_syspath=True):
    cfg = get_config()
    if cfg.has_option('settings', project):
        os.environ['SCRAPY_SETTINGS_MODULE'] = cfg.get('settings', project)
    closest = closest_scrapy_cfg()
    if closest:
        projdir = os.path.dirname(closest)
        if set_syspath and projdir not in sys.path:
            sys.path.append(projdir)
Initialize environment to use command-line tool from inside a project
dataset/ETHPy150Open scrapy/scrapy/scrapy/utils/conf.py/init_env