Skip to content

Instantly share code, notes, and snippets.

View ChenZaichuang-Dev's full-sized avatar

ChenZaichuang-Dev

View GitHub Profile
@ChenZaichuang-Dev
ChenZaichuang-Dev / log_exec.py
Created April 12, 2023 03:39 — forked from mckaydavis/log_exec.py
Python non-blocking reading from stdout and stderr of subprocess.popen process using os.pipe and select.select
#!/usr/bin/env python
# File: log_exec.py
# Author: McKay Davis
# Date: Jun 23, 2014
# Non-blocking stdout and stderr read from a
# Popen process
import os
import subprocess