python - Program freezes trying to read subprocess' stdout -
i have program, makes screenshots , uploads them server, printing link ss afterwards.
output that:
######################################################################## 100,0% https://puu.sh/vce2l/533ecb687d.png first line behaves loading bar , uses stderr stream.
second line stdout link retrieve.
so i'm writing script like:
p = subprocess.popen(['puush', '-a'],stdout=subprocess.pipe, stderr=subprocess.pipe) out, err = p.communicate() script freezes on communicate(), if puush program terminates when use terminal.
when do:
p = subprocess.popen(['puush', '-a'],stdout=subprocess.pipe, stderr=subprocess.pipe) p.wait() print('here') i see process being terminated normally.
i thankful if give me hint.
Comments
Post a Comment