os-independent
library for easier work with different system platforms such as config files, path stuff and so on...
example
from os_independent import OSIndependent
osi = OSIndependent("project_name")
# by default empty config is {"editor": "nano"}
# gets the config file for project_name, useful for cli's and command line stuff
# all config files are stored at either ~, ~/.config or %APPDATA%
print(osi.get_config()) # {"editor": "nano"}
# add new stuff to the config
osi.config["meow"] = "that"
osi.save_config()
# --- or ---
# this variant saves the config immediately after adding new stuff
osi.add_to_config({"meow": "that"})
# calls osi.cli_edit(osi.config_path)
# which in this case runs "nano ~/.config/project_name.json" in your terminal
osi.edit_config()
# reset config, in this case it will return to {"editor": "nano"}
osi.reset_config()
# cli stuff
# cli_edit in this case runs "nano <path>"
osi.cli_edit(path)
# cli_read in linux runs "less <path>"
osi.cli_read(path)
# you can also run this to return the contents of path in terminal instead
osi.cli_read(path, print_in_terminal = True)
things might be a bit different on other systems
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
os_independent-1.0.0.tar.gz
(3.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file os_independent-1.0.0.tar.gz.
File metadata
- Download URL: os_independent-1.0.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f9207ee39cd9709ca91ab7ade1e3634ee6e82a8d8e01350722026b61c9ea83a
|
|
| MD5 |
6147b8dec640aa24312fce4d099c26a5
|
|
| BLAKE2b-256 |
367f09af188cb985c1ac7c1bc8534c058cff80e04b0ed0fccd482ccd53637a12
|
File details
Details for the file os_independent-1.0.0-py3-none-any.whl.
File metadata
- Download URL: os_independent-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0557e13fa375f4d7b217f5634694f6e8570595cdf1058f81e100be988a4032be
|
|
| MD5 |
ab2d2e02c1666a97db6ca20c71b25875
|
|
| BLAKE2b-256 |
69e8cd8061f4edb89e20d760b6882284719b17cc8c5bb542daf54ae6b8f10f69
|