diff --git a/cpdctrl_gui/resources/__init__.py b/cpdctrl_gui/resources/__init__.py new file mode 100644 index 0000000..ee5d36a --- /dev/null +++ b/cpdctrl_gui/resources/__init__.py @@ -0,0 +1,8 @@ +from importlib.resources import files, as_file +from os import path + +def get_resource_path(module: str, name: str) -> str: + with as_file(files(module)) as file: + p = path.join(file, name) + return p +# print(get_resource_path("resources", "about.md")) diff --git a/resources/logo.png b/cpdctrl_gui/resources/logo.png similarity index 100% rename from resources/logo.png rename to cpdctrl_gui/resources/logo.png diff --git a/resources/logo.svg b/cpdctrl_gui/resources/logo.svg similarity index 100% rename from resources/logo.svg rename to cpdctrl_gui/resources/logo.svg