try few things
This commit is contained in:
parent
11f2160605
commit
423a7c2e20
1 changed files with 17 additions and 6 deletions
|
|
@ -1,11 +1,22 @@
|
||||||
from os import path
|
from os import path
|
||||||
import logging
|
import logging
|
||||||
ROOT_DIR = path.dirname(path.abspath(__file__))
|
from pathlib import Path
|
||||||
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
# ROOT_DIR = path.dirname(path.abspath(__file__))
|
||||||
|
#
|
||||||
|
# logging.debug("ROOT_DIR: ", ROOT_DIR)
|
||||||
|
#
|
||||||
|
# def get_absolute_path(path_from_root: str) -> str:
|
||||||
|
# logging.debug("abspath: ", path.abspath(path.join(ROOT_DIR, path_from_root)))
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# return path.abspath(path.join(ROOT_DIR, path_from_root))
|
||||||
|
ROOT_DIR = Path(__file__).resolve().parent
|
||||||
|
|
||||||
logging.debug("ROOT_DIR: ", ROOT_DIR)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
logging.debug("ROOT_DIR: %s", ROOT_DIR)
|
||||||
|
|
||||||
def get_absolute_path(path_from_root: str) -> str:
|
def get_absolute_path(path_from_root: str) -> str:
|
||||||
logging.debug("abspath: ", path.abspath(path.join(ROOT_DIR, path_from_root)))
|
absolute_path = ROOT_DIR / path_from_root
|
||||||
|
logging.debug("abspath: %s", absolute_path.resolve())
|
||||||
|
return str(absolute_path.resolve())
|
||||||
return path.abspath(path.join(ROOT_DIR, path_from_root))
|
|
||||||
Loading…
Add table
Reference in a new issue