absresgetter

Get absolute resource path of exterior package


Keywords
python, python-inspect, python-os, python3, python37
License
MIT
Install
pip install absresgetter==0.0.12

Documentation

python-get-absolute-resource-path

Get absolute resource path of exterior package

Setup

python -m pip install python-get-absolute-resource-path

Description

There is only one method. get_absolute_resource_path(res: str) -> str.

This package find the module in the stack which includes relative resource path like 'ico/sample.png'.

You can get the absolute path like 'C:/.../sample_exists_directory/ico/sample.png'.

Example

print(get_absolute_resource_path('ico/dark-notepad.svg')) # C:/.../ico_dark_notepad_exists_directory/ico/dark-notepad.svg