"Horta" <[EMAIL PROTECTED]> wrote: > Sometimes, when I do an os.popen*(), the process executed by the > command hangs, and the script stops forever on the readline()/ > readlines() calls. I found that I can use select, but I'm thinking... > if, after a sellect() call returns, the stdout (for example) has more > than one line? or if it has just some characters, no newline, and the > process just hangs? > > I just want a readline(timeout) and readlines(timeout) like > functions. Do I need to create my owns or there're already > implemented?
you have to unblock the file and use try - except. look at the fcntl module - Hendrik -- http://mail.python.org/mailman/listinfo/python-list