Added get_src_root utility function.

This commit is contained in:
Fabio Manganiello 2023-08-23 02:53:31 +02:00
parent 1ef0d804db
commit b10ccdb313
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 9 additions and 0 deletions

View File

@ -646,4 +646,13 @@ def get_remaining_timeout(
return cls(max(0, timeout - (time.time() - start)))
def get_src_root() -> str:
"""
:return: The root source folder of the application.
"""
import platypush
return os.path.dirname(inspect.getfile(platypush))
# vim:sw=4:ts=4:et: