• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

sh.egg-info/H03-May-2022-13196

CHANGELOG.mdH A D15-May-202115.4 KiB210162

MANIFEST.inH A D15-May-202174 42

PKG-INFOH A D15-May-20214.7 KiB13196

README.rstH A D15-May-20212.5 KiB9662

setup.cfgH A D15-May-2021138 149

setup.pyH A D15-May-20211.9 KiB5952

sh.pyH A D15-May-2021132.8 KiB3,9802,602

test.pyH A D15-May-202186.2 KiB3,2112,425

README.rst

1.. image:: https://raw.githubusercontent.com/amoffat/sh/master/logo-230.png
2    :target: https://amoffat.github.com/sh
3    :alt: Logo
4
5|
6
7.. image:: https://img.shields.io/pypi/v/sh.svg?style=flat-square
8    :target: https://pypi.python.org/pypi/sh
9    :alt: Version
10.. image:: https://img.shields.io/pypi/dm/sh.svg?style=flat-square
11    :target: https://pypi.python.org/pypi/sh
12    :alt: Downloads Status
13.. image:: https://img.shields.io/pypi/pyversions/sh.svg?style=flat-square
14    :target: https://pypi.python.org/pypi/sh
15    :alt: Python Versions
16.. image:: https://img.shields.io/travis/amoffat/sh/master.svg?style=flat-square
17    :target: https://travis-ci.org/amoffat/sh
18    :alt: Build Status
19.. image:: https://img.shields.io/coveralls/amoffat/sh.svg?style=flat-square
20    :target: https://coveralls.io/r/amoffat/sh?branch=master
21    :alt: Coverage Status
22
23|
24
25sh is a full-fledged subprocess replacement for Python 2.6 - 3.8, PyPy and PyPy3
26that allows you to call *any* program as if it were a function:
27
28.. code:: python
29
30    from sh import ifconfig
31    print(ifconfig("eth0"))
32
33sh is *not* a collection of system commands implemented in Python.
34
35`Complete documentation here <https://amoffat.github.io/sh>`_
36
37Installation
38============
39
40::
41
42    $> pip install sh
43
44Support
45=======
46* `Andrew Moffat <https://github.com/amoffat>`_ - author/maintainer
47* `Erik Cederstrand <https://github.com/ecederstrand>`_ - maintainer
48
49
50Developers
51==========
52
53Updating the docs
54-----------------
55
56Check out the `gh-pages <https://github.com/amoffat/sh/tree/gh-pages>`_ branch and follow the ``README.rst`` there.
57
58Testing
59-------
60
61I've included a Docker test suite in the `docker_test_suit/` folder.  To build the image, `cd` into that directory and
62run::
63
64    $> ./build.sh
65
66This will install ubuntu 18.04 LTS and all python versions from 2.6-3.8.  Once it's done, stay in that directory and
67run::
68
69    $> ./run.sh
70
71This will mount your local code directory into the container and start the test suite, which will take a long time to
72run.  If you wish to run a single test, you may pass that test to `./run.sh`::
73
74    $> ./run.sh FunctionalTests.test_unicode_arg
75
76To run a single test for a single environment::
77
78    $> ./run.sh -e 3.4 FunctionalTests.test_unicode_arg
79
80Coverage
81--------
82
83First run all of the tests::
84
85    $> python sh.py test
86
87This will aggregate a ``.coverage``.  You may then visualize the report with::
88
89    $> coverage report
90
91Or generate visual html files with::
92
93    $> coverage html
94
95Which will create ``./htmlcov/index.html`` that you may open in a web browser.
96