esp-idf/components/esptool_py/esptool/esptool.py
2022-04-22 21:31:17 +02:00

23 lines
531 B
Python

#
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
#
# SPDX-License-Identifier: Apache-2.0
#
import os
import sys
try:
sys.path.remove(os.path.dirname(os.path.realpath(__file__))) # do not import this script
except ValueError:
pass
try:
import esptool
except ImportError:
raise ModuleNotFoundError('No module named "esptool" please install esptool.py by running '
'the install and export scripts.')
if __name__ == '__main__':
esptool._main() # type: ignore