Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
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.

_appdirs.py 820B

1234567891011121314151617181920212223242526272829303132
  1. # -*- test-case-name: twisted.python.test.test_appdirs -*-
  2. # Copyright (c) Twisted Matrix Laboratories.
  3. # See LICENSE for details.
  4. """
  5. Application data directory support.
  6. """
  7. import inspect
  8. from typing import cast
  9. import appdirs # type: ignore[import]
  10. from twisted.python.compat import currentframe
  11. def getDataDirectory(moduleName: str = "") -> str:
  12. """
  13. Get a data directory for the caller function, or C{moduleName} if given.
  14. @param moduleName: The module name if you don't wish to have the caller's
  15. module.
  16. @returns: A directory for putting data in.
  17. """
  18. if not moduleName:
  19. caller = currentframe(1)
  20. module = inspect.getmodule(caller)
  21. assert module is not None
  22. moduleName = module.__name__
  23. return cast(str, appdirs.user_data_dir(moduleName))