Pyshell
A python module for writing shell-scripts in Python. It introduces new functionality, bundles functions distributed over several modules of Python's standard library in one place and provides several auxiliary functions.
The function's provided by the shell module are named after the corresponding
Unix commands.
Here's a quick demo:
from shell import *
rm('a/b/foo.txt')
mv('X.pdf', f'{HOME}/contents.pdf')
files = ls('Documents', '*.txt', '*.c')
magicFiles = run(['grep', 'magic'] + files, captureStdout=splitLines, onError='ignore').stdout
- Requirements: Python 3
- API documentation
- PyPI page
- Installation:
pip install libPyshell
Changelog
-
0.6.6 (2026-07-01)
- switch to static typing
- make the package PEP 561-typed
-
0.5.0 (2025-03-11)
- support of timeouts for run
-
0.4.1 (2024-09-12)
- fix capture handling
- add failOnError option to rm commands
-
0.4.0 (2024-03-20)
- re-implement run in terms of subprocess.run. This fixes a bug that caused stdout to disappear.
-
0.3.0 (2024-02-01)
- uniform treatment when capturing stdout and stderr. This lead to changes to RunResult and RunError which are slightly backwards incompatible.
-
0.2.0 (2024-01-29)
- Better static type information
-
0.1.7 (2023-03-30)
forceparameter forcp
-
0.1.5 and 0.1.6 (2023-03-03)
- Some bugfixes
-
0.1.4 (2022-03-17)
- Flush stdout and stderr before running a command
Release files for libPyshell 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| libpyshell-0.6.0.tar.gz | 10.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| libpyshell-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.1 kB
Release files / libpyshell-0.6.0.tar.gz
| Download URL | libpyshell-0.6.0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fd8fddcbc0a08311ae1ded024a5a9c3794a1fe70c754fb5565a1788e9d19ab0
|
|
BLAKE2b-256 checksum How to use checksums |
8c6298b32c9a06c4a645494751fb9ba9d490c9d1e7f76fd9b7ef7ff64e830513
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.1
|
Release files / libpyshell-0.6.0-py3-none-any.whl
| Download URL | libpyshell-0.6.0-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b139cbd718843ca4cc56e5c33e7f1673b9994e3332ce0531c11e342317dd246
|
|
BLAKE2b-256 checksum How to use checksums |
46a2ae290ae7c73ae28c4e66afe98e53eb4b0698ea958cce307a86f8c1006e6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.1
|