¡@

Home 

python Programming Glossary: slave_fd

Python subprocess readlines() hangs

http://stackoverflow.com/questions/12419198/python-subprocess-readlines-hangs

select from subprocess import Popen STDOUT master_fd slave_fd pty.openpty # provide tty to enable # line buffering on ruby's.. side proc Popen 'ruby' 'ruby_sleep.rb' bufsize 1 stdout slave_fd stderr STDOUT close_fds True timeout .04 # seconds while 1 ready.. is not None # select timeout break # proc exited os.close slave_fd # can't do it sooner it leads to errno.EIO error os.close master_fd..

Python C program subprocess hangs at “for line in iter”

http://stackoverflow.com/questions/20503671/python-c-program-subprocess-hangs-at-for-line-in-iter

select from subprocess import Popen STDOUT master_fd slave_fd pty.openpty # provide tty to enable line buffering process Popen.. tty to enable line buffering process Popen . main stdin slave_fd stdout slave_fd stderr STDOUT bufsize 0 close_fds True timeout.. line buffering process Popen . main stdin slave_fd stdout slave_fd stderr STDOUT bufsize 0 close_fds True timeout .1 # ugly but..