So I noticed subprocess.call while it waits for the command to finish before proceeding with the python script, I have no way of getting the stdout, except with
subprocess.call
With Python 3.8 this workes for me. For instance to execute a python script within the venv:
import subprocess import sys res = subprocess.run([ sys.executable, # venv3.8/bin/python 'main.py', '--help',], stdout=PIPE, text=True) print(res.stdout)