comrun (shorthand for command runner) is a simple, configurable wrapper for Python's subprocess.Popen, focused on making it easy to run external commands from Python scripts.
Add to your project with uv:
uv add comrunJust create a CommandRunner instance and call it with the command you want to run:
from comrun import CommandRunner
runner = CommandRunner()
# Run your command – instance is callable
result = runner('echo "The cake is a lie."')
# (prints "The cake is a lie." to the console)The same runner instance can be reused indefinitely to call other commands.
Full documentation can be found here.