Skip to main content

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

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)

    • force parameter for cp
  • 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)

Source distribution for libPyshell 0.6.0
File Size Uploaded
libpyshell-0.6.0.tar.gz 10.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for libPyshell 0.6.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page