Substitute for subprocess that handles all hassle that comes from different platform and python versions, and allows live stdout and stderr capture for background job/interactive GUI programming ;)
This release adds a new parameter to allow keeping stdout/stderr queues after command_runner
has finished.
no_close_queues
parameter to leave stdout/stderr queues open for later usage by parent functionsThis release is a quick fix for priority settings
This release mainly adds process priority settings and a couple of shorthands for other functionality.
This is a hotfix release for v1.4.0 that mainly targets an encoding issue.
sleep
instead of ping sleep emulation on LinuxThis is a feature rich release which primary function is to allow background jobs to report live stdout/stderr stream data to your favorite application by using queues or callback functions. It also fixes a couple of Python 2.7 & PyPy issues.
command_runner_threaded()
function which allows to run in background, but stil provide live stdout/stderr stream output via queues/callbackssplit_stream
argument which will make command_runner return (exit_code, stdout, stderr) instead of (exit_code, output) tuplecheck_interval
argument which decides how much time we sleep between two checks, defaults to 0.05 seconds.
Lowering this improves responsiveness, but increases CPU usage. Default value should be more than reasaonable for most applicationsstop_on
argument which takes a function, which is called every check_interval
and will interrupt execution if it returns Trueprocess_callback
argument which takes a function(process), which is called upon execution with a subprocess.Popen object as argument for optional external process controlencoding=False
so we get raw output (bytes)shell=True
This is a maintenance release to address some CI and packaging issues only. You only need to update if you're experiencing pip install problems under Python 2.7.
This release adds the possibility to disable stdout/stderr capture by adding stdout=False
and/or stderr=False
parameters on top of the existing file and/or pipe parameters.
Add python 3.10 to the test matrix
This release adresses some race conditions that happen only under some circonstances with pypy 3.7, where the timeout check thread hasn't yet returned but the process monitor already stops because the process to monitor has finished. In that case, timeouts were enforced, but the exit code was 137 (corresponding to the exit code of a killed process).
This release is a major refactor of the stdout capture methods employed within command_runner. So we jump from v0.7.0 to v1.2.0 since we have a major rework, and minor fixes too. Since we include a critical fix, everybody is encouraged to migrate to this version.
live_output=True
) option is now explicit (uses poller method only)echo "test" && sleep 100 && echo "done"