def initialise(): global _environment if _environment is not None: return clients.initialise() global_env = environment.Environment({}, user_env=False) _load_global_environment(global_env) _environment = global_env
def initialise(): global _environment if _environment is not None: return clients.initialise() global_env = environment.Environment({}, user_env=False) _load_global_environment(global_env) _environment = global_env global_env.registry.log_resource_info(show_all=True)
def initialise(): global _environment if _environment is not None: return clients.initialise() # 利用 env 这个全局变量保存加载的资源,初始化前,先初始化 clients global_env = environment.Environment( {}, user_env=False) # 先创建一个中间变量 env 对象,然后加载了资源后赋值给全局变量env _load_global_environment(global_env) _environment = global_env global_env.registry.log_resource_info(show_all=True)