Skip to main content

ClearEnvironment

汇总

用于将特定环境设置重置为其默认值。

语法

ClearEnvironment(environment_name)

参数 说明 数据类型

environment_name

The name of the environment setting that will be reset to its default setting.

String

代码示例

ClearEnvironment 示例

用于将特定环境设置重置为其默认值。

import arcpy

arcpy.env.workspace = "c:/data/world.gdb"

# Prints c:/data/world.gdb
print(arcpy.env.workspace)

arcpy.ClearEnvironment("workspace")

# Prints None
print(arcpy.env.workspace)