Skip to main content

Support for writing shell scripts in Python

Project description

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.1.5 (2023-03-03)

    • Some bugfixes
  • 0.1.4 (2022-03-17)

    • Flush stdout and stderr before running a command

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libPyshell-0.1.5.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

libPyshell-0.1.5-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file libPyshell-0.1.5.tar.gz.

File metadata

  • Download URL: libPyshell-0.1.5.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for libPyshell-0.1.5.tar.gz
Algorithm Hash digest
SHA256 da914fe237827bb41495dbed8d416456df447637877f42d2494d6606d188100e
MD5 e39b97ab2fbdfe03db1bb3942016b624
BLAKE2b-256 99f3d9992369fd0199097ee77d064769e32e4aed227e8fac4fd9738c1a777cc6

See more details on using hashes here.

File details

Details for the file libPyshell-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: libPyshell-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for libPyshell-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 75f514e5936ee92f67aec2d6ffcbc755c4c0469da9fac2d5bd3528e1f516e7b3
MD5 f7c9915cb7e07b31e7bd6d7a960bb559
BLAKE2b-256 cf7e5f970e9855491f2597665047620eef08e34fa40319f0def5ac40e7a1f6c9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page