I'm trying to display realtime data using subprocess module, But it only display first line only. I tried to follow some of the tutorials. which are given here
read subprocess stdout line by line
Code i tried
import subprocess
proc = subprocess.Popen(
['aria2c', 'http://cdimage.deepin.com/releases/20Beta/deepin-20Beta-desktop-amd64.iso'], stdout=subprocess.PIPE)
while True:
line = proc.stdout.readline()
if not line:
break
# the real code does filtering here
print("test:", line.rstrip())
Actual Output
Expected Output