Python Subprocess Manager
Project description
Description
A wrapper around python’s subprocess module which handles new process spawning (optionally as a daemon), specifying a timeout period, and printing/logging/accessing the process’ output in a non-blocking fashion.
Installation
pip install subprocess_manager
Usage
from subprocess_manager.run_subprocess import run_subprocess process, execution_time = run_subprocess('/bin/bash', ['-l', '-c', 'echo "Hello World!"') tail_process, command_starttime, command_process_stdout, command_process_stderr = run_subprocess('/bin/bash', ['-l', '-c', 'tail process.log', daemon=True, return_std=True)
See subprocess_manager/run_subprocess.py for additional arguments and details.
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
File details
Details for the file subprocess_manager-0.1.2.tar.gz
.
File metadata
- Download URL: subprocess_manager-0.1.2.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2f3cd41299705b1bd29e6c859bb53eb4ee18370dce3d7313e91630124d8feaf |
|
MD5 | 2a91c2539e3f3726cae6da1667ee75b1 |
|
BLAKE2b-256 | 9b6c691643aa61bcb9a829fafc67ba41c4db020d5fa0e37fe262a85fc63a2dcc |