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

        <bdo id='zLmWE'></bdo><ul id='zLmWE'></ul>
      1. <tfoot id='zLmWE'></tfoot>

      2. <small id='zLmWE'></small><noframes id='zLmWE'>

        <legend id='zLmWE'><style id='zLmWE'><dir id='zLmWE'><q id='zLmWE'></q></dir></style></legend>
      3. 是否有 subprocess.call 的安静版本?

        时间:2023-07-20
        <legend id='fk4lZ'><style id='fk4lZ'><dir id='fk4lZ'><q id='fk4lZ'></q></dir></style></legend>
          <bdo id='fk4lZ'></bdo><ul id='fk4lZ'></ul>
          <i id='fk4lZ'><tr id='fk4lZ'><dt id='fk4lZ'><q id='fk4lZ'><span id='fk4lZ'><b id='fk4lZ'><form id='fk4lZ'><ins id='fk4lZ'></ins><ul id='fk4lZ'></ul><sub id='fk4lZ'></sub></form><legend id='fk4lZ'></legend><bdo id='fk4lZ'><pre id='fk4lZ'><center id='fk4lZ'></center></pre></bdo></b><th id='fk4lZ'></th></span></q></dt></tr></i><div id='fk4lZ'><tfoot id='fk4lZ'></tfoot><dl id='fk4lZ'><fieldset id='fk4lZ'></fieldset></dl></div>

                <tbody id='fk4lZ'></tbody>
            1. <tfoot id='fk4lZ'></tfoot>

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

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

                  问题描述

                  是否有 subprocess.call 的变体可以在不打印到标准输出的情况下运行命令,或者有一种方法可以阻止它的标准输出消息?

                  Is there a variant of subprocess.call that can run the command without printing to standard out, or a way to block out it's standard out messages?

                  推荐答案

                  是的.将其 stdout 重定向到 /dev/null.

                  Yes. Redirect its stdout to /dev/null.

                  process = subprocess.call(["my", "command"], stdout=open(os.devnull, 'wb'))
                  

                  这篇关于是否有 subprocess.call 的安静版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:env: python : 没有这样的文件或目录 下一篇:Python:如何以非阻塞方式读取子进程的标准输出

                  相关文章

                  <tfoot id='PFx9o'></tfoot>

                  <legend id='PFx9o'><style id='PFx9o'><dir id='PFx9o'><q id='PFx9o'></q></dir></style></legend>
                    • <bdo id='PFx9o'></bdo><ul id='PFx9o'></ul>

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

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