Name | subprocess-tee JSON |
Version |
0.4.1
JSON |
| download |
home_page | |
Summary | subprocess-tee |
upload_time | 2022-12-17 12:09:15 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | MIT |
keywords |
subprocess
asyncio
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# subprocess-tee
This package provides a drop-in alternative to `subprocess.run` that
captures the output while still printing it in **real-time**, just the way
`tee` does.
Printing output in real-time while still capturing is valuable for
any tool that executes long-running child processes. For those, you do want
to provide instant feedback (progress) related to what is happening.
```python
# from subprocess import run
from subprocess_tee import run
result = run("echo 123")
result.stdout == "123\n"
```
You can add `tee=False` to disable the tee functionality if you want, this
being a much shorter alternative than adding the well known
`stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL`.
Keep in mind that `universal_newlines=True` is implied as we expect text
processing, this being a divergence from the original `subprocess.run`.
You can still use `check=True` in order to make it raise CompletedProcess
exception when the result code is not zero.
Raw data
{
"_id": null,
"home_page": "",
"name": "subprocess-tee",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Sorin Sbarnea <sorin.sbarnea@gmail.com>",
"keywords": "subprocess,asyncio",
"author": "",
"author_email": "Sorin Sbarnea <sorin.sbarnea@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/f6/a0/acafd85c7c0aead293a16a70a49aba20ba2af9478771370b2897eae6059c/subprocess-tee-0.4.1.tar.gz",
"platform": null,
"description": "# subprocess-tee\n\nThis package provides a drop-in alternative to `subprocess.run` that\ncaptures the output while still printing it in **real-time**, just the way\n`tee` does.\n\nPrinting output in real-time while still capturing is valuable for\nany tool that executes long-running child processes. For those, you do want\nto provide instant feedback (progress) related to what is happening.\n\n```python\n# from subprocess import run\nfrom subprocess_tee import run\n\nresult = run(\"echo 123\")\nresult.stdout == \"123\\n\"\n```\n\nYou can add `tee=False` to disable the tee functionality if you want, this\nbeing a much shorter alternative than adding the well known\n`stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL`.\n\nKeep in mind that `universal_newlines=True` is implied as we expect text\nprocessing, this being a divergence from the original `subprocess.run`.\n\nYou can still use `check=True` in order to make it raise CompletedProcess\nexception when the result code is not zero.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "subprocess-tee",
"version": "0.4.1",
"split_keywords": [
"subprocess",
"asyncio"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "255382cf0f8a3640506afa8af1ce8503",
"sha256": "eca56973a1c1237093c2055b2731bcaab784683b83f22c76f26e4c5763402e28"
},
"downloads": -1,
"filename": "subprocess_tee-0.4.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "255382cf0f8a3640506afa8af1ce8503",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5109,
"upload_time": "2022-12-17T12:09:13",
"upload_time_iso_8601": "2022-12-17T12:09:13.813883Z",
"url": "https://files.pythonhosted.org/packages/df/05/2ab0eca1a36a1a3d14657ccd069660636de53d7ce58050568f3bcd2e0f12/subprocess_tee-0.4.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "b1c4db50bf9bb1182ef92deeac9a35a9",
"sha256": "b3c124993f8b88d1eb1c2fde0bc2069787eac720ba88771cba17e8c93324825d"
},
"downloads": -1,
"filename": "subprocess-tee-0.4.1.tar.gz",
"has_sig": false,
"md5_digest": "b1c4db50bf9bb1182ef92deeac9a35a9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 13599,
"upload_time": "2022-12-17T12:09:15",
"upload_time_iso_8601": "2022-12-17T12:09:15.164929Z",
"url": "https://files.pythonhosted.org/packages/f6/a0/acafd85c7c0aead293a16a70a49aba20ba2af9478771370b2897eae6059c/subprocess-tee-0.4.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-17 12:09:15",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "subprocess-tee"
}