appdirs.py 832 B

123456789101112131415161718192021222324252627282930313233
  1. import appdirs
  2. # https://github.com/ActiveState/appdirs
  3. def get_app_log_dir():
  4. """
  5. Get the the log directory for VIEW
  6. :return: str, directory path on file system
  7. """
  8. name, org, domain = get_app_name_organization_domain()
  9. return appdirs.user_log_dir(appname=name,
  10. appauthor=org)
  11. def get_app_usr_data_dir():
  12. """
  13. Get the the log directory for VIEW
  14. :return: str, directory path on file system
  15. """
  16. name, org, domain = get_app_name_organization_domain()
  17. return appdirs.user_data_dir(appname=name,
  18. appauthor=org)
  19. def get_app_name_organization_domain():
  20. """
  21. Returns name, organization and domain to be used with VIEW
  22. :return: tuple of strings
  23. """
  24. return "VIEW", "UKN_Neuro", "neuro.uni-konstanz.de"