Skip to main content

Python subprocess interface

Project description

[![Build Status](https://travis-ci.org/amoffat/sh.png)](https://travis-ci.org/amoffat/sh) [![Coverage Status](https://coveralls.io/repos/amoffat/sh/badge.png?branch=travis)](https://coveralls.io/r/amoffat/sh?branch=travis)

[![Version](https://pypip.in/v/sh/badge.png)](https://pypi.python.org/pypi/sh) [![Downloads](https://pypip.in/d/sh/badge.png)](https://pypi.python.org/pypi/sh)

sh (previously [pbs](http://pypi.python.org/pypi/pbs)) is a full-fledged subprocess replacement for Python 2.6 - 3.4 that allows you to call any program as if it were a function:

`python from sh import ifconfig print ifconfig("eth0") `

sh is not a collection of system commands implemented in Python.

# Installation

$> pip install sh

# Complete documentation @ http://amoffat.github.com/sh

# Testing

First install the development requirements:

$> pip install -r requirements-dev.txt

Then use [tox](http://tox.readthedocs.org/en/latest/index.html) test runner:

$> tox

To run a single test for all environments:

$> tox FunctionalTests.test_unicode_arg

To run a single test for a single environment:

$> tox -e py34 FunctionalTests.test_unicode_arg

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

sh-1.10.tar.gz (36.7 kB view details)

Uploaded Source

File details

Details for the file sh-1.10.tar.gz.

File metadata

  • Download URL: sh-1.10.tar.gz
  • Upload date:
  • Size: 36.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sh-1.10.tar.gz
Algorithm Hash digest
SHA256 ccb139fbc3e262f486cd8080599a7efb9101b614b5eda3b5a3b414450b24c395
MD5 0e5f7d6c06201205c1c123ec1b95cbae
BLAKE2b-256 8b11feff01ff8c4e0dfabe285590eb70fac16c897b7fc01152706a1fdcb3298f

See more details on using hashes here.

Supported by

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