代码拉取完成,页面将自动刷新
#!/usr/bin/env python
#
# SPDX-FileCopyrightText: 2014-2022 Fredrik Ahlberg, Angus Gratton,
# Espressif Systems (Shanghai) CO LTD, other contributors as noted.
#
# SPDX-License-Identifier: GPL-2.0-or-later
# This executable script is a thin wrapper around the main functionality
# in the espsecure Python package
# When updating this script, please also update esptool.py and espefuse.py
import contextlib
import os
import sys
if os.name != "nt":
# Linux/macOS: remove current script directory to avoid importing this file
# as a module; we want to import the installed espsecure module instead
with contextlib.suppress(ValueError):
executable_dir = os.path.dirname(sys.executable)
sys.path = [
path
for path in sys.path
if not path.endswith(("/bin", "/sbin")) and path != executable_dir
]
# Linux/macOS: delete imported module entry to force Python to load
# the module from scratch; this enables importing espsecure module in
# other Python scripts
with contextlib.suppress(KeyError):
del sys.modules["espsecure"]
import espsecure
if __name__ == "__main__":
espsecure._main()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。