p = Popen(['command', 'args'], stdout=PIPE, universal_newlines=True)
tmp = ''
delims = {'#', '!'}
for ch in iter(lambda : p.stdout.read(1), ''):
    pass
how to read subprocess stdout using a different separator from line break