Add tee like functionally to Popen
Project description
About
Adding tee like functionally to subprocess.Popen.
Installation
$ python -m pip install teetime
Documentation
Documentation is available via GitHub.
Basic Usage
Common usage is:
import sys
import teetime
with open('log.txt', 'wb') as f:
process = teetime.popen_call(
['python', 'test.py'],
stdout=(sys.stdout.buffered, f),
stderr=(sys.stderr.buffered, f),
)
process.wait()
Note: popen_call blocks until IO is complete. If you have no IO, stdout=(), then it will not block. This is why you still need process.wait().
Testing
To run all tests run nox. No venv is needed; nox makes all of them for us.
$ python -m pip install --user nox
$ git clone https://peilonrayz.github.io/teetime/
$ cd teetime
teetime $ nox
License
TeeTime is available under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
teetime-0.0.3.tar.gz
(5.5 kB
view details)
Built Distribution
File details
Details for the file teetime-0.0.3.tar.gz
.
File metadata
- Download URL: teetime-0.0.3.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4afbb5c1bc5f83dc47e7ee14604185ea176eed9ca1db3749d34e62c08d48f873 |
|
MD5 | 5fbd43049c3be33ca593532d12c132e4 |
|
BLAKE2b-256 | a7f73d24ea94ca3b5c41c9d4aaf3809cb364206fc8176239d3d78a675199541c |
File details
Details for the file teetime-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: teetime-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89437d786fb97b716d434998302e73b85967d83770e238d4d27fbdd8245f8b0c |
|
MD5 | 8f3881e015f3fad4bfa298a8f415fd5c |
|
BLAKE2b-256 | 7ab5ee8feac3b01ce65ba460e5895cdc69ec4371bd467ab627019110f3fd8b3c |