esptool.py 531 B

12345678910111213141516171819202122
  1. #
  2. # SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
  3. #
  4. # SPDX-License-Identifier: Apache-2.0
  5. #
  6. import os
  7. import sys
  8. try:
  9. sys.path.remove(os.path.dirname(os.path.realpath(__file__))) # do not import this script
  10. except ValueError:
  11. pass
  12. try:
  13. import esptool
  14. except ImportError:
  15. raise ModuleNotFoundError('No module named "esptool" please install esptool.py by running '
  16. 'the install and export scripts.')
  17. if __name__ == '__main__':
  18. esptool._main() # type: ignore