WallGo.PotentialTools.utils

Utility functions

Functions

getSafePathToResource(relativePathToResource)

Gives a safe path to a packaged resource.

getSafePathToResource(relativePathToResource)[source]

Gives a safe path to a packaged resource. The input is a relative path from PotentialTools package directory (ie. where __init__.py is located). Use this function to convert the relative path to a path that is safe to use in packaged context. Example relative path: /Data/Something/example.txt.

Returns:

Path to the resource file

Return type:

str.

Parameters:

relativePathToResource (str)