- Notifications
You must be signed in to change notification settings - Fork0
arpitjain799/sh
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation

If you are migrating from 1.* to 2.*, please see MIGRATION.md
sh is a full-fledged subprocess replacement for Python 3.8 - 3.10, PyPy and PyPy3that allows you to callany program as if it were a function:
fromshimportifconfigprint(ifconfig("eth0"))
sh isnot a collection of system commands implemented in Python.
sh relies on various Unix system calls and only works on Unix-like operatingsystems - Linux, macOS, BSDs etc. Specifically, Windows is not supported.
$> pip install sh
- Andrew Moffat - author/maintainer
- Erik Cederstrand - maintainer
Check out thegh-pages branch and follow theREADME.rst
there.
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
First run all of the tests:
$> SH_TESTS_RUNNING=1 coverage run --source=sh -m unittest
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.
About
Python process launching
Resources
License
Stars
Watchers
Forks
Packages0
Languages
- Python99.4%
- Other0.6%