cpenv/utils.py
def set_env_from_file(env_file):
    '''Restore the current environment from an environment stored in a yaml
    yaml file.

    :param env_file: Path to environment yaml file.
    '''

    with open(env_file, 'r') as f:
        env_dict = yaml.load(f.read())

    if 'environment' in env_dict:
        env_dict = env_dict['environment']

    set_env(env_dict)
def set_env_from_file(env_file):
    '''Restore the current environment from an environment stored in a yaml
    yaml file.

    :param env_file: Path to environment yaml file.
    '''

    with open(env_file, 'r') as f:
        env_dict = yaml.load(f.read())

    if 'environment' in env_dict:
        env_dict = env_dict['environment']

    set_env(env_dict)
def set_env_from_file ( env_file ) : with open ( env_file , 'r' ) as f : env_dict = yaml . load ( f . read ( ) ) if 'environment' in env_dict : env_dict = env_dict [ 'environment' ] set_env ( env_dict )
Restore the current environment from an environment stored in a yaml
    yaml file.

    :param env_file: Path to environment yaml file.
Restore the current environment from an environment stored in a yaml yaml file .