20 @brief Returns the absolute path to a resource given by a relative path depending on the environment (EXE or Python)
21 @param s_relative_path : the relative path to a file or directory
22 @return absolute path to the resource
24 if hasattr(sys,
"_MEIPASS"):
26 s_base_path = sys._MEIPASS
28 s_base_path = os.path.abspath(
"../")
29 s_resource_path = os.path.join(s_base_path, s_relative_path)
30 log.debug(
"Resource Path (relative %s): %s", s_relative_path, s_resource_path)
31 return s_resource_path