I think I might be repeating the question but I didn't find any of the answers suited to my requirement. Pardon my ignorance.
I have a program running which continuously spits out some binary data from a server.It never stops until it's killed.
I want to wrap it in a python script to read the output and process it as and when it arrives. I tried out few of the subprocess ideas in stack overflow but no use. Please suggest.
p=subprocess.popen(args,stderr=PIPE,stdin=PIPE,stdout=PIPE,shell=FALSE)
#p.communicate#blocks forever as expected
#p.stdout.read/readlines/readline-->blocks
#select(on p.stdout.fileno())-->blocks
what is the best method?