EasyProcess

1.1 · active · verified Sun Apr 12

EasyProcess is a simple, easy-to-use Python subprocess interface, providing a convenient layer on top of the standard `subprocess` module. It simplifies starting and stopping programs, retrieving their standard output and error streams, and managing return codes. The library supports Python versions 3.7 through 3.12 and is currently at version 1.1.

Warnings

Install

Imports

Quickstart

This example demonstrates how to run a simple Python command using EasyProcess, wait for its completion, and retrieve its standard output and return code.

import sys
from easyprocess import EasyProcess

# Get the Python executable path
python_executable = sys.executable

# Run a simple Python command, wait for it, and get stdout
process_result = EasyProcess([python_executable, "-c", "print('Hello from EasyProcess')"]).call()
print("Stdout:", process_result.stdout)
print("Return Code:", process_result.return_code)

view raw JSON →