Skip to main content

tee-logfile

Small Python utility to duplicate process output to a logfile while preserving console output (similar to Unix tee).

Features

  • Mirror stdout (and optionally stderr) to a file and the console.
  • Lightweight and easy to integrate into scripts or pipelines.
  • Designed for use on macOS and other Unix-like systems.

Requirements

  • Python 3.9+

Installation

pip install tee-logfile

Usage

from tee_logfile import Tee

with Tee.context('/path/to/output.log'):
    my_cli_code_to_run()

Development

release

poetry version minor
tox -e release
pip install ~/projects/sandbox/tee-logfile

Download files

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

Source Distribution

tee_logfile-0.3.9.tar.gz (1.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tee_logfile-0.3.9-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file tee_logfile-0.3.9.tar.gz.

File metadata

  • Download URL: tee_logfile-0.3.9.tar.gz
  • Upload date:
  • Size: 1.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.13 Darwin/24.6.0

File hashes

Hashes for tee_logfile-0.3.9.tar.gz
Algorithm Hash digest
SHA256 f6001ff1e0ed5b043fc319b88cfdf270df5b13a42dda79d4a419bae83e6cca8e
MD5 d1471132e0b33f09f06c87b3356b5d6d
BLAKE2b-256 73c9b55287234fbef878916de3c72674affa033245c07b503545af0c00044e2b

See more details on using hashes here.

File details

Details for the file tee_logfile-0.3.9-py3-none-any.whl.

File metadata

  • Download URL: tee_logfile-0.3.9-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.13 Darwin/24.6.0

File hashes

Hashes for tee_logfile-0.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 56c2c18faf4ba12157ec58a4075507146f5f73b11bed0b4682bc76c3a0e49d98
MD5 db31f15b500e0f401eb5ac956aaec8d1
BLAKE2b-256 08704ab8f939f231a5c837d0a63023dbfb2c65ebdbfbdd6ebdb1864a6032c6f1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.9 This release

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page