EncryptPYT

摘要

EncryptPYT 函数用于加密 Python 工具箱文件。

警告:

在同一位置对 Python 工具箱执行加密,将覆盖未加密的原始 .pyt 文件。 建议您对输入文件进行备份,以免在忘记密码时造成内容丢失。

说明

还可以通过在 ArcGIS Pro 中单击工具箱来加密 Python 工具箱。

语法

EncryptPYT (toolbox, password)
参数说明数据类型
toolbox

The Python toolbox that will be encrypted in place.

String
password

The password used to lock the encrypted Python toolbox.

String

代码示例

EncryptPYT 示例

加密 Python 工具箱。

import arcpy

toolbox = 'd:/tools/analysis.pyt'
password = '<your password>'

arcpy.EncryptPYT(toolbox, password)

相关主题