This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jafo
Recipients ajb, jafo
Date 2007-09-18.21:24:29
SpamBayes Score 0.0002157148
Marked as misclassified No
Message-id <1190150669.73.0.0554042714469.issue1175@psf.upfronthosting.co.za>
In-reply-to
Content
Arguably, you should be using "select" and "read" (instead of readline)
for this operation.  That's what I've done in the past when doing
something similar.  Specifically, I believe I have looped reading into a
buffer with read, and using select with a timeout (even a fraction of a
second can work) until the timeout triggers.  This way I don't block,
but I also don't run into problems with the system call returning an error.

I avoid using readline in this case because I don't expect it to work
well on the stdout of an interactive command.

You may also want to look at the pty module.

I guess I'd say this should probably go to the python mailing list for
further discussion.  Can you post a message there about it?
History
Date User Action Args
2007-09-18 21:24:29jafosetspambayes_score: 0.000215715 -> 0.0002157148
recipients: + jafo, ajb
2007-09-18 21:24:29jafosetspambayes_score: 0.000215715 -> 0.000215715
messageid: <1190150669.73.0.0554042714469.issue1175@psf.upfronthosting.co.za>
2007-09-18 21:24:29jafolinkissue1175 messages
2007-09-18 21:24:29jafocreate