<bdo id='IiZhS'></bdo><ul id='IiZhS'></ul>
<legend id='IiZhS'><style id='IiZhS'><dir id='IiZhS'><q id='IiZhS'></q></dir></style></legend>
    1. <small id='IiZhS'></small><noframes id='IiZhS'>

      <tfoot id='IiZhS'></tfoot>

      1. <i id='IiZhS'><tr id='IiZhS'><dt id='IiZhS'><q id='IiZhS'><span id='IiZhS'><b id='IiZhS'><form id='IiZhS'><ins id='IiZhS'></ins><ul id='IiZhS'></ul><sub id='IiZhS'></sub></form><legend id='IiZhS'></legend><bdo id='IiZhS'><pre id='IiZhS'><center id='IiZhS'></center></pre></bdo></b><th id='IiZhS'></th></span></q></dt></tr></i><div id='IiZhS'><tfoot id='IiZhS'></tfoot><dl id='IiZhS'><fieldset id='IiZhS'></fieldset></dl></div>
      2. 从 gevent-subprocess 获取实时标准输出?

        Get live stdout from gevent-subprocess?(从 gevent-subprocess 获取实时标准输出?)
            <bdo id='TIWoq'></bdo><ul id='TIWoq'></ul>
              <i id='TIWoq'><tr id='TIWoq'><dt id='TIWoq'><q id='TIWoq'><span id='TIWoq'><b id='TIWoq'><form id='TIWoq'><ins id='TIWoq'></ins><ul id='TIWoq'></ul><sub id='TIWoq'></sub></form><legend id='TIWoq'></legend><bdo id='TIWoq'><pre id='TIWoq'><center id='TIWoq'></center></pre></bdo></b><th id='TIWoq'></th></span></q></dt></tr></i><div id='TIWoq'><tfoot id='TIWoq'></tfoot><dl id='TIWoq'><fieldset id='TIWoq'></fieldset></dl></div>

                <small id='TIWoq'></small><noframes id='TIWoq'>

                <legend id='TIWoq'><style id='TIWoq'><dir id='TIWoq'><q id='TIWoq'></q></dir></style></legend>

                  <tbody id='TIWoq'></tbody>
                • <tfoot id='TIWoq'></tfoot>
                  本文介绍了从 gevent-subprocess 获取实时标准输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试通过 POPEN 获取进程的标准输出,只要它存在.使用 gevent 1.0 readline() 和 read() 仍然会阻塞进程并等待进程完成.有什么线索吗?是的,我到处寻找一个简单的解决方案.不用线程就必须是可能的,对吧?

                  I'm trying to get the stdout of a process via POPEN as soon as it's there. With gevent 1.0 readline() and read() still block process and wait for process to finish. Any clues? And yes, I searched high and low for a simple solution. It has to be possible without threading, right?

                  推荐答案

                  我用一个小技巧解决了这个问题.每当将一行写入标准输出时,只需使用 self.stream.flush() 和一个辅助类刷新 Python 的行缓冲区.

                  I solved this using a little hack. Just flush Pythons line-buffer w/ self.stream.flush() and a helper class whenever a line is written to stdout.

                  这篇关于从 gevent-subprocess 获取实时标准输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Pythonic and efficient way of finding adjacent cells in grid(在网格中查找相邻单元格的 Pythonic 和有效方法)
                  map a hexagonal grid in matplotlib(在 matplotlib 中映射六边形网格)
                  Execute arbitrary python code remotely - can it be done?(远程执行任意 python 代码 - 可以吗?)
                  Python - Plotting colored grid based on values(Python - 根据值绘制彩色网格)
                  Is there a GUI design app for the Tkinter / grid geometry?(是否有 Tkinter/网格几何图形的 GUI 设计应用程序?)
                  tkinter Canvas Scrollbar with Grid?(带有网格的 tkinter 画布滚动条?)
                    <i id='FIizs'><tr id='FIizs'><dt id='FIizs'><q id='FIizs'><span id='FIizs'><b id='FIizs'><form id='FIizs'><ins id='FIizs'></ins><ul id='FIizs'></ul><sub id='FIizs'></sub></form><legend id='FIizs'></legend><bdo id='FIizs'><pre id='FIizs'><center id='FIizs'></center></pre></bdo></b><th id='FIizs'></th></span></q></dt></tr></i><div id='FIizs'><tfoot id='FIizs'></tfoot><dl id='FIizs'><fieldset id='FIizs'></fieldset></dl></div>

                    <small id='FIizs'></small><noframes id='FIizs'>

                        <legend id='FIizs'><style id='FIizs'><dir id='FIizs'><q id='FIizs'></q></dir></style></legend>
                          <tbody id='FIizs'></tbody>
                      1. <tfoot id='FIizs'></tfoot>

                        • <bdo id='FIizs'></bdo><ul id='FIizs'></ul>