shared.py 676 B

12345678910111213141516171819202122
  1. import pyigl as igl
  2. import sys
  3. import os
  4. TUTORIAL_SHARED_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../tutorial/shared/")
  5. def check_dependencies(deps):
  6. available = [hasattr(igl, m) for m in deps]
  7. all_available = True
  8. for i, d in enumerate(available):
  9. if not d:
  10. all_available = False
  11. print("The libigl python bindings were compiled without %s support. Please recompile with the CMAKE flag LIBIGL_WITH_%s." %(deps[i], deps[i].upper()))
  12. if not all_available:
  13. sys.exit(-1)
  14. def print_usage(key_dict):
  15. print("Usage:")
  16. for k in key_dict.keys():
  17. print("%s : %s" %(k, key_dict[k]))