Skip to main content

Note: Work in Progress.

This lib aims to provide a Human friendly interface for subprocess.

If you need piped subprocesses, give envoy a try.

https://img.shields.io/travis/SkyLothar/shcmd/master.svg?style=flat-square https://img.shields.io/coveralls/SkyLothar/shcmd/master.svg?style=flat-square https://img.shields.io/pypi/v/shcmd.svg?style=flat-square

Usage

import shcmd

with shcmd.cd("/tmp"):
    # get result directly
    assert shcmd.run("pwd") == "/tmp"
    # get streamed result packed in a generator
    streamed = shcmd.run("ls", stream=True)
    for filename in streamed.iter_lines():
        print(filename)
    # get full stdout/stderr
    print(streamed.stdout)
    print(streamed.stderr)

Download files

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

Source Distribution

shcmd-0.5.4.tar.gz (10.6 kB view details)

Uploaded Source

File details

Details for the file shcmd-0.5.4.tar.gz.

File metadata

  • Download URL: shcmd-0.5.4.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for shcmd-0.5.4.tar.gz
Algorithm Hash digest
SHA256 3b8c1af5dbc9f9009517b1b1a0653ee2fbe5449b1de77bb599e5df704668ba5c
MD5 810c582b0b793b2ad8785fa9f81991da
BLAKE2b-256 dd0c0cfc1436037aa15e47da4ec38882984525100b2bc30e1ad6e0a04698442d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.4 This release

1 file

0.5.3

1 file

0.5.2

1 file

0.5.1

1 file

0.5.0

1 file

0.4.1

1 file

0.4.0

1 file

0.3.0

1 file

0.2.0

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

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