Jan-25-2024, 02:50 PM
Hello,
Apparently, subprocess is currently the solution du jour to run an external application from Python 3.12.
For some reason, output is returned through stderr instead of stdout:
Thank you.
Apparently, subprocess is currently the solution du jour to run an external application from Python 3.12.
For some reason, output is returned through stderr instead of stdout:
import subprocess import sys import os os.chdir(r'c:\temp') p = run( [ r'c:\ffprobe.exe','-hide_banner',r"input.mp4"], shell=True,capture_output = True,text = True, check=True) #!!! outputs to stderr!!! print( 'stdout:', p.stdout) #nothing print( 'stderr:', p.stderr)What am I doing wrong?
Thank you.