Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/yjg30737/absresgetter
- Owner: yjg30737
- License: mit
- Created: 2022-03-04T23:27:14.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-17T06:35:06.000Z (over 2 years ago)
- Last Synced: 2024-09-18T11:48:01.069Z (3 months ago)
- Topics: python, python-inspect, python-os, python3, python37
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.