Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yjg30737/absresgetter

Get absolute resource path of exterior package
https://github.com/yjg30737/absresgetter

python python-inspect python-os python3 python37

Last synced: 16 days ago
JSON representation

Get absolute resource path of exterior package

Awesome Lists containing this project

README

        

# absresgetter
Get absolute resource path of exterior package

## Setup
`python -m pip install absresgetter`

## Description
There is only one method. `getabsres(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
```python
import absresgetter
...
print(absresgetter.getabsres('ico/dark-notepad.svg')) # C:/.../ico_dark_notepad_exists_directory/ico/dark-notepad.svg
```

## Gibberish
I hope this kind of feature is inlcuded in official libarary.

I really don't want to be bothered with.