How to use sys.stdout and stdout.pipe in subprocess.run
Posted: Thu Oct 13, 2022 7:17 pm
Hi,
I want to print the external commands and output both in real-time and in logs,
I am using the below
I want to use sys.stdout along with sys.stdout to do in real-time,
Please advise
Thanks
Shanmugam
I want to print the external commands and output both in real-time and in logs,
I am using the below
Code: Select all
p=subprocess.run("powershell.exe",c:\temp\hello.ps1",stdout=sp.PIPE,stderr =stdout)
I want to use sys.stdout along with sys.stdout to do in real-time,
Please advise
Thanks
Shanmugam