Files
bearhub/fpakman/core/resource.py
Vinicius Moreira f467da2fbf debugging on
2019-06-17 15:54:46 -03:00

17 lines
444 B
Python
Executable File

import os
from pathlib import Path
local_resource_path = '{}/.local/share/fpakman/resources'.format(str(Path.home()))
app_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def get_path(resource_path):
if os.path.exists(local_resource_path):
final_path = local_resource_path + '/' + resource_path
else:
final_path = app_dir + '/resources/' + resource_path
print(final_path)
return final_path