python-sh
Subpackage Descriptions
single |
:alt: Logo
**If you are migrating from 1.* to 2.*, please see MIGRATION.md**
|
:alt: Version
:alt: Downloads Status
:alt: Python Versions
:alt: Coverage Status
|
sh is a full-fledged subprocess replacement for Python 3.8 - 3.12, and PyPy
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.
sh relies on various Unix system calls and only works on Unix-like
operating
systems - Linux, macOS, BSDs etc. Specifically, Windows is not supported.
[Complete documentation here]
Installation
============
::
$> pip install sh
Support
=======
* [Andrew Moffat] - author/maintainer
* [Erik Cederstrand] - maintainer
Developers
==========
Testing
-------
Tests are run in a docker container against all supported Python versions.
To run, make the following target::
$> make test
To run a single test::
$> make test='FunctionalTests.test_background' test_one
Coverage
--------
First run all of the tests::
$> SH_TESTS_RUNNING=1 coverage run --source=sh -m pytest
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.
|
Configuration Switches (platform-specific settings discarded)
PY312 OFF Build using Python 3.12
PY313 ON Build using Python 3.13
Package Dependencies by Type
Download groups
main |
mirror://PYPIWHL/3d/9a/3fb455591ab32280ea9397e8cb02b167bf591428e89779a896f2998cfd56 |
Distribution File Information
c7369c4ae13729d8ea100b5e93af1a8be528a008433428e38651c9f2b5b5fe2c 38147 python-src/sh-2.2.1-py3-none-any.whl
Ports that require python-sh:v13
No other ports depend on this one. |