Message149210
| Author |
ncoghlan |
| Recipients |
ncoghlan |
| Date |
2011年12月11日.05:05:53 |
| SpamBayes Score |
1.6867822e-05 |
| Marked as misclassified |
No |
| Message-id |
<1323579954.88.0.437166836576.issue13578@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
subprocess.check_output() is nice, but doesn't help if you want to process the piped data line-by-line.
Currently, that means you have to do the full Popen dance if you want access to each line of output as it becomes available.
This RFE is for a subprocess.iter_output() module level helper that:
1. Starts the subprocess
2. Yield the individual lines of output as they are produced by the subprocess
3. Cleans up (including checking for errors) at the end
This biggest challenge I have noticed so far in exploring this is how to handle timeouts on Windows - on Unix, select.select() can do the job, but that won't handle pipes in the Windows case. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年12月11日 05:05:54 | ncoghlan | set | recipients:
+ ncoghlan |
| 2011年12月11日 05:05:54 | ncoghlan | set | messageid: <1323579954.88.0.437166836576.issue13578@psf.upfronthosting.co.za> |
| 2011年12月11日 05:05:54 | ncoghlan | link | issue13578 messages |
| 2011年12月11日 05:05:53 | ncoghlan | create |
|