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.1.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.1.tar.gz.
File metadata
- Download URL: os_independent-1.0.1.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 |
194cbc999b861c4cebab7a51f5eebfd443d13c004103cfc261441d8db762dab1
|
|
| MD5 |
8fa86f964ff16007bf352f202a2a43d3
|
|
| BLAKE2b-256 |
e06c75ce1850c89d97bca103afbf7508e67c02d89d81726ea52c1d27156d76ed
|
File details
Details for the file os_independent-1.0.1-py3-none-any.whl.
File metadata
- Download URL: os_independent-1.0.1-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 |
6fb7b435254c771fb1b6d81b48e06ec85856e670fca4373c7e000d301965fd67
|
|
| MD5 |
a405a1ed2285954187a682013fd198c8
|
|
| BLAKE2b-256 |
7c52ac689288e00d8f80573154555756019a2ba0cf273d316761f827315de9cc
|