CLFGUI / src /clfgui /gui /paths.py
smlflg's picture
Initial public upload from Projekte/CLFGUI
a4514b4 verified
Raw History Blame Contribute Delete
462 Bytes
from __future__ import annotations
import os
from pathlib import Path
from PySide6.QtCore import QStandardPaths
from clfgui.kernel import default_db_path
def qstandard_db_path() -> Path:
if os.environ.get("CLFGUI_DB_PATH"):
return default_db_path()
location = QStandardPaths.writableLocation(QStandardPaths.StandardLocation.AppDataLocation)
if not location:
return default_db_path()
return Path(location) / "clfgui.sqlite3"