25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

__init__.py 507 B

123456789101112131415161718192021222324
  1. import os
  2. from pathlib import Path
  3. import config as cfg
  4. def base_dir() -> str:
  5. return Path(os.path.abspath(os.path.dirname(__file__))).parent
  6. def app_root_dir(pvd: str) -> str:
  7. return os.path.join(base_dir(), cfg.DIR_APP_ROOT, pvd)
  8. def doc_root_dir() -> str:
  9. return os.path.join(base_dir(), cfg.DIR_DOC_ROOT)
  10. def resource_dir(pvd: str) -> str:
  11. return os.path.join(base_dir(), cfg.DIR_RESOURCE, pvd)
  12. def template_dir() -> str:
  13. return os.path.join(base_dir(), cfg.DIR_TEMPLATE)