How can I handle a process stderr?
proc = subprocess.Popen('ll'.split(), stdout=subprocess.PIPE)
for i in proc.stdout:
print(i)
Right now I am streaming the output but I am not sure how to properly deal with a potential error that might occur.
I wanted to use out, err = proc.communicate()
but my out
could be a very very very long string