Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python subprocess replacement

Project Description
.. image:: https://raw.githubusercontent.com/amoffat/sh/master/logo-230.png
:target: https://amoffat.github.com/sh
:alt: Logo

|

.. image:: https://img.shields.io/pypi/v/sh.svg?style=flat-square
:target: https://pypi.python.org/pypi/sh
:alt: Version
.. image:: https://img.shields.io/pypi/pyversions/sh.svg?style=flat-square
:target: https://pypi.python.org/pypi/sh
:alt: Python Versions
.. image:: https://img.shields.io/travis/amoffat/sh/master.svg?style=flat-square
:target: https://travis-ci.org/amoffat/sh
:alt: Build Status
.. image:: https://img.shields.io/coveralls/amoffat/sh.svg?style=flat-square
:target: https://coveralls.io/r/amoffat/sh?branch=master
:alt: Coverage Status

|

sh is a full-fledged subprocess replacement for Python 2.6 - 3.6, PyPy and PyPy3
that allows you to call any program as if it were a function:

.. code:: python

from sh import ifconfig
print ifconfig("eth0")

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

`Complete documentation here<https://amoffat.github.com/sh>`_

Installation
============

::

$> pip install sh

Updating the docs
=================

Check out the `gh-pages <https://github.com/amoffat/sh/tree/gh-pages>`_ branch and follow the ``README.rst`` there.

Developers
==========

Testing
-------

First install the development requirements::

$> pip install -r requirements-dev.txt

The run the tests for all Python versions on your system::

$> python sh.py test

To run a single test for all environments::

$> python sh.py test FunctionalTests.test_unicode_arg

To run a single test for a single environment::

$> python sh.py test -e 3.4 FunctionalTests.test_unicode_arg

Coverage
--------

First run all of the tests::

$> python sh.py test

This will aggregate a ``.coverage``. You may then visualize the report with::

$> coverage report

Or generate visual html files with::

$> coverage html

Which will create ``./htmlcov/index.html`` that you may open in a web browser.


Release History

Release History

This version
History Node

1.12.14

History Node

1.12.13

History Node

1.12.12

History Node

1.12.11

History Node

1.12.10

History Node

1.12.9

History Node

1.12.8

History Node

1.12.7

History Node

1.12.6

History Node

1.12.5

History Node

1.12.4

History Node

1.12.3

History Node

1.12.2

History Node

1.12.1

History Node

1.12.0

History Node

1.11

History Node

1.10

History Node

1.09

History Node

1.08

History Node

1.07

History Node

1.06

History Node

1.05

History Node

1.04

History Node

1.03

History Node

1.02

History Node

1.01

History Node

1.0

History Node

0.108

History Node

0.107

History Node

0.106

History Node

0.01

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sh-1.12.14-py2.py3-none-any.whl (38.9 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jun 7, 2017
sh-1.12.14.tar.gz (56.9 kB) Copy SHA256 Checksum SHA256 Source Jun 7, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting