No project description provided
Project description
rabs
Relative to absolute file names
Converts a string path that is relative to the calling file to an absolute path.
Usage:
function: real_to_abs_filename
Args: path: str ret: ret: Literal["string","path"] = "string"
from rabs import real_to_abs_filename
real_to_abs_filename(".", ret="string") # the default
real_to_abs_filename("../siblingfolder/someotherfile.py")
# or
real_to_abs_filename("./somefile.exe", ret="path")
# returns a pathlib.Path object (python's built in library)
Why:
Python is inconsistent with respect to relative paths. This makes it as bulletproof as possible.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rabs-0.1.0.tar.gz
(1.8 kB
view details)
Built Distribution
rabs-0.1.0-py3-none-any.whl
(2.3 kB
view details)
File details
Details for the file rabs-0.1.0.tar.gz
.
File metadata
- Download URL: rabs-0.1.0.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.10.12 Linux/5.10.102.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba1a90f44af6c0157011290ce2e5dbc876d8c445fb97aef6d4b2d088062a56f1 |
|
MD5 | b59543c7914bb97245d1088f3679e29b |
|
BLAKE2b-256 | 3310d046c74d10ace35f989c130dbee4d2ac5abd69f32669a8b1e6fd9460d734 |
File details
Details for the file rabs-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: rabs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.10.12 Linux/5.10.102.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db96f9f9b1e0ff672d651f7f5f7ce6960d3ed11b6b70ebca7f024b20a23c503 |
|
MD5 | 0120defeb2b69df7bd7672b7bbc4804b |
|
BLAKE2b-256 | 2b31bb1d4f27f64f6f24ac64d6e23f90fe37a85b30db1fe34afd28c3c446ed6f |