Skip to main content

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


Download files

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

Source Distribution

subprocess_manager-0.1.2.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file subprocess_manager-0.1.2.tar.gz.

File metadata

File hashes

Hashes for subprocess_manager-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a2f3cd41299705b1bd29e6c859bb53eb4ee18370dce3d7313e91630124d8feaf
MD5 2a91c2539e3f3726cae6da1667ee75b1
BLAKE2b-256 9b6c691643aa61bcb9a829fafc67ba41c4db020d5fa0e37fe262a85fc63a2dcc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page