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

        <i id='w9N8d'><tr id='w9N8d'><dt id='w9N8d'><q id='w9N8d'><span id='w9N8d'><b id='w9N8d'><form id='w9N8d'><ins id='w9N8d'></ins><ul id='w9N8d'></ul><sub id='w9N8d'></sub></form><legend id='w9N8d'></legend><bdo id='w9N8d'><pre id='w9N8d'><center id='w9N8d'></center></pre></bdo></b><th id='w9N8d'></th></span></q></dt></tr></i><div id='w9N8d'><tfoot id='w9N8d'></tfoot><dl id='w9N8d'><fieldset id='w9N8d'></fieldset></dl></div>

        • <bdo id='w9N8d'></bdo><ul id='w9N8d'></ul>
        <tfoot id='w9N8d'></tfoot>

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

        抑制 subprocess.Popen 的输出

        Suppress output from subprocess.Popen(抑制 subprocess.Popen 的输出)

        <small id='3HTfp'></small><noframes id='3HTfp'>

            <bdo id='3HTfp'></bdo><ul id='3HTfp'></ul>

          • <i id='3HTfp'><tr id='3HTfp'><dt id='3HTfp'><q id='3HTfp'><span id='3HTfp'><b id='3HTfp'><form id='3HTfp'><ins id='3HTfp'></ins><ul id='3HTfp'></ul><sub id='3HTfp'></sub></form><legend id='3HTfp'></legend><bdo id='3HTfp'><pre id='3HTfp'><center id='3HTfp'></center></pre></bdo></b><th id='3HTfp'></th></span></q></dt></tr></i><div id='3HTfp'><tfoot id='3HTfp'></tfoot><dl id='3HTfp'><fieldset id='3HTfp'></fieldset></dl></div>

                <legend id='3HTfp'><style id='3HTfp'><dir id='3HTfp'><q id='3HTfp'></q></dir></style></legend>
                  <tbody id='3HTfp'></tbody>
                <tfoot id='3HTfp'></tfoot>

                • 本文介绍了抑制 subprocess.Popen 的输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何停止 subprocess.Popen 的输出?如果打印量很大,打印有时会很慢.

                  How do you stop the output from subprocess.Popen from being output? Printing can sometimes be slow if there is a great deal of it.

                  推荐答案

                  如果你想彻底扔掉:

                  import subprocess
                  import os
                  with open(os.devnull, 'w') as fp:
                      cmd = subprocess.Popen(("[command]",), stdout=fp)
                  

                  如果您使用的是 Python 2.5,则需要 from __future__ import with_statement,或者干脆不要使用 with.

                  If you are using Python 2.5, you will need from __future__ import with_statement, or just don't use with.

                  这篇关于抑制 subprocess.Popen 的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 画布滚动条?)

                    <tfoot id='sELMx'></tfoot>
                  1. <i id='sELMx'><tr id='sELMx'><dt id='sELMx'><q id='sELMx'><span id='sELMx'><b id='sELMx'><form id='sELMx'><ins id='sELMx'></ins><ul id='sELMx'></ul><sub id='sELMx'></sub></form><legend id='sELMx'></legend><bdo id='sELMx'><pre id='sELMx'><center id='sELMx'></center></pre></bdo></b><th id='sELMx'></th></span></q></dt></tr></i><div id='sELMx'><tfoot id='sELMx'></tfoot><dl id='sELMx'><fieldset id='sELMx'></fieldset></dl></div>
                        <bdo id='sELMx'></bdo><ul id='sELMx'></ul>
                            <tbody id='sELMx'></tbody>

                          • <small id='sELMx'></small><noframes id='sELMx'>

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