图片解析应用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
463 B

  1. # Copyright (c) Microsoft Corporation. All rights reserved.
  2. # Licensed under the MIT License.
  3. """
  4. Short examples used in the documentation.
  5. """
  6. import os
  7. def get_example(name):
  8. """
  9. Retrieves the absolute file name of an example.
  10. """
  11. this = os.path.abspath(os.path.dirname(__file__))
  12. full = os.path.join(this, name)
  13. if not os.path.exists(full):
  14. raise FileNotFoundError("Unable to find example '{0}'".format(name))
  15. return full