- website: Website
- copyright: Copyright and License
- repo status: Repo Information
- installation: Common Setup
Summary
pyosal is an Operating System Abstraction Layer written in Python. It contains various functions help write cross-platform python code.
see doc/pyosal_api.md or the website above for more information about these functions.
Future changes
Over time, I will be searching through my projects looking for code like:
if pyosal.os_name == 'ubuntu':
do_some_thing_ubu()
elif pyosal.os_name == 'msys2':
do_some_thing_msys2()
It might be possible that do_some_thing() is a viable OSAL function to be added to pyosal.
Function Summary
A summary of the functions available are:
| Name | Type | Description |
|---|---|---|
os_name |
property | get OS name/tag |
os_version |
property | get OS version info |
python_version |
property | get python version info |
root_dir |
property | get path for root directory |
root_dir_msys2 |
property | get root directory for msys2 shells |
userid |
property | get current userid |
hostname |
property | get current PC's hostname |
os_valid |
property | get list of recognized valid OS names |
curr_repo_dir |
property | current repo directory converted to posix |
curr_repo_name |
property | current repo name |
run_cmd_timeout |
function | run a command in a subprocess, terminate after a timeout |
run_cmd |
function | run a command in a subprocess |
stdout_flush |
function | flush for stdout |
stderr_flush |
function | flush for stderr |
xlat_to_win |
function | convert a path to windows i.e. backslashes |
xlat_to_posix |
function | convert a path to posix i.e. forward slashes |
xlat_dir_to_relative |
function | convert a path to relative to home |
abort |
function | abort the current script |
Metadata
Release files for pyosal 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyosal-1.0.2.tar.gz | 13.5 kB | Without provenance | Details for pyosal-1.0.2.tar.gz |
Release files / pyosal-1.0.2.tar.gz
| Download URL | pyosal-1.0.2.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e103d769cf5f680b6c9f7d6238801b339b7a5ec27dc77ff89d75186802d92a4
|
|
BLAKE2b-256 checksum How to use checksums |
006b481dcb16e55ffe6eaed68d96b7fa8d76250b5363e1312a3fc318cb32cd12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for pyosal 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.