read and readline hanging

O

Olivier Lefevre

I am calling subprocess.Popen with
p = Popen(args, bufsize=-1, stdin=PIPE, stdout=PIPE, stderr=PIPE)
and after sending come command to the process, I try to read
from p.stdout but after a few calls I hang. What is the correct
way to do this, i.e., to read everything w/o getting stuck? I am
not familiar with all these low-level functions and their annoying
blocking behaviour. Note that I don't want to close the process
because I want to send more commands to it after that, read the
results, and so on and on.

Thanks,

-- O.L.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top