<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](resource.xhtml "resource --- Resource usage information") | - [上一頁](fcntl.xhtml "fcntl --- The fcntl and ioctl system calls") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - [Python 標準庫](index.xhtml) ? - [Unix 專有服務](unix.xhtml) ? - $('.inline-search').show(0); | # [`pipes`](#module-pipes "pipes: A Python interface to Unix shell pipelines. (Unix)") --- Interface to shell pipelines **Source code:** [Lib/pipes.py](https://github.com/python/cpython/tree/3.7/Lib/pipes.py) \[https://github.com/python/cpython/tree/3.7/Lib/pipes.py\] - - - - - - The [`pipes`](#module-pipes "pipes: A Python interface to Unix shell pipelines. (Unix)") module defines a class to abstract the concept of a *pipeline*--- a sequence of converters from one file to another. Because the module uses **/bin/sh** command lines, a POSIX or compatible shell for [`os.system()`](os.xhtml#os.system "os.system") and [`os.popen()`](os.xhtml#os.popen "os.popen") is required. The [`pipes`](#module-pipes "pipes: A Python interface to Unix shell pipelines. (Unix)") module defines the following class: *class* `pipes.``Template`An abstraction of a pipeline. 示例: ``` >>> import pipes >>> t = pipes.Template() >>> t.append('tr a-z A-Z', '--') >>> f = t.open('pipefile', 'w') >>> f.write('hello world') >>> f.close() >>> open('pipefile').read() 'HELLO WORLD' ``` ## Template Objects Template objects following methods: `Template.``reset`()Restore a pipeline template to its initial state. `Template.``clone`()Return a new, equivalent, pipeline template. `Template.``debug`(*flag*)If *flag* is true, turn debugging on. Otherwise, turn debugging off. When debugging is on, commands to be executed are printed, and the shell is given `set -x` command to be more verbose. `Template.``append`(*cmd*, *kind*)Append a new action at the end. The *cmd* variable must be a valid bourne shell command. The *kind* variable consists of two letters. The first letter can be either of `'-'` (which means the command reads its standard input), `'f'` (which means the commands reads a given file on the command line) or `'.'` (which means the commands reads no input, and hence must be first.) Similarly, the second letter can be either of `'-'` (which means the command writes to standard output), `'f'` (which means the command writes a file on the command line) or `'.'` (which means the command does not write anything, and hence must be last.) `Template.``prepend`(*cmd*, *kind*)Add a new action at the beginning. See [`append()`](#pipes.Template.append "pipes.Template.append") for explanations of the arguments. `Template.``open`(*file*, *mode*)Return a file-like object, open to *file*, but read from or written to by the pipeline. Note that only one of `'r'`, `'w'` may be given. `Template.``copy`(*infile*, *outfile*)Copy *infile* to *outfile* through the pipe. ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](resource.xhtml "resource --- Resource usage information") | - [上一頁](fcntl.xhtml "fcntl --- The fcntl and ioctl system calls") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - [Python 標準庫](index.xhtml) ? - [Unix 專有服務](unix.xhtml) ? - $('.inline-search').show(0); | ? [版權所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 軟件基金會是一個非盈利組織。 [請捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [發現了問題](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 創建。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看