A simple way to run terminal commands within a Python script.
from simple_terminal import Terminal
terminal = Terminal()
results = terminal.command('ls')
or
from simple_terminal import Terminal
with Terminal() as terminal:
results = terminal.command('ls')
This library exists to run terminal commands from within a script and capture stdout to create easier automation of commonly performed tasks.
pip install simple_terminal
MIT