I think I can use from J.F. Sebastian's answer in another thread to read from a subprocess line by line, using a line buffer
p = Popen(["command", "args"], stdout=PIPE, bufsize=1)
with p.stdout:
for line in iter(p.stdout.readline, b''):
print(line, end='\n')
The problem I'm trying to solve is my output doesn't have line breaks, but uses special characters (such as "#") to indicate termination, which I want to treat as line breaks when printing.