Skip to main content

Add tee like functionally to Popen

Project description

Teetime

Master Build Status

Adding tee like functionally to subprocess.Popen.

Installation

$ pip install teetime

How to use

There is some documentation in the code, and can be generated with tox -e docs. 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().

Development

All tests use are run via tox. This includes running static analysis tools, unit tests and generating documentation.

$ tox

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for teetime, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size teetime-0.0.2-py3-none-any.whl (5.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size teetime-0.0.2.tar.gz (5.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page