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