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)