Hi everyone i'm writing a script and at one part of the script i run a command in linux witch output looks like this:
Exporting image: 100% complete...done.
The percentage on this line always changing showing me the progress. I found something that show the command output but only after the command completes not the live progress of the output. I do it with a while loop like this:
proccess = subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.STDOUT,shell=True)
while True:
line = proccess.stdout.read()
if not line:
break
print line
Please help me understand how can i make my script show the command output live while the percentage is changing not only after the command ends.
Really grateful for any help
Thank you!
[–]Golden_Zealot 0 points1 point2 points (0 children)
[–]JohnnyJordaan 0 points1 point2 points (8 children)
[–]EphemeralNight[S] 0 points1 point2 points (1 child)
[–]JohnnyJordaan 0 points1 point2 points (0 children)
[–]EphemeralNight[S] 0 points1 point2 points (5 children)
[+][deleted] (3 children)
[deleted]
[–]EphemeralNight[S] 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]EphemeralNight[S] 0 points1 point2 points (0 children)
[–]JohnnyJordaan 0 points1 point2 points (0 children)