Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > e1011ddec34cda34f3a002b121247943 > files > 817

python-docs-2.7.17-1.1.mga7.noarch.rpm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>17. Interprocess Communication and Networking &#8212; Python 2.7.17 documentation</title>
    <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python 2.7.17 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="next" title="17.1. subprocess — Subprocess management" href="subprocess.html" />
    <link rel="prev" title="16.9. rlcompleter — Completion function for GNU readline" href="rlcompleter.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
    <link rel="canonical" href="https://docs.python.org/2/library/ipc.html" />
    <script type="text/javascript" src="../_static/copybutton.js"></script>
    
 
    

  </head><body>  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="subprocess.html" title="17.1. subprocess — Subprocess management"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="rlcompleter.html" title="16.9. rlcompleter — Completion function for GNU readline"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &#187;</li>
        <li>
          <a href="../index.html">Python 2.7.17 documentation</a> &#187;
        </li>

          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">The Python Standard Library</a> &#187;</li> 
      </ul>
    </div>    

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="interprocess-communication-and-networking">
<span id="ipc"></span><h1>17. Interprocess Communication and Networking<a class="headerlink" href="#interprocess-communication-and-networking" title="Permalink to this headline">¶</a></h1>
<p>The modules described in this chapter provide mechanisms for different processes
to communicate.</p>
<p>Some modules only work for two processes that are on the same machine, e.g.
<a class="reference internal" href="signal.html#module-signal" title="signal: Set handlers for asynchronous events."><code class="xref py py-mod docutils literal notranslate"><span class="pre">signal</span></code></a> and <a class="reference internal" href="subprocess.html#module-subprocess" title="subprocess: Subprocess management."><code class="xref py py-mod docutils literal notranslate"><span class="pre">subprocess</span></code></a>.  Other modules support networking protocols
that two or more processes can use to communicate across machines.</p>
<p>The list of modules described in this chapter is:</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="subprocess.html">17.1. <code class="xref py py-mod docutils literal notranslate"><span class="pre">subprocess</span></code> — Subprocess management</a><ul>
<li class="toctree-l2"><a class="reference internal" href="subprocess.html#using-the-subprocess-module">17.1.1. Using the <code class="xref py py-mod docutils literal notranslate"><span class="pre">subprocess</span></code> Module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#frequently-used-arguments">17.1.1.1. Frequently Used Arguments</a></li>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#popen-constructor">17.1.1.2. Popen Constructor</a></li>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#exceptions">17.1.1.3. Exceptions</a></li>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#security">17.1.1.4. Security</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="subprocess.html#popen-objects">17.1.2. Popen Objects</a></li>
<li class="toctree-l2"><a class="reference internal" href="subprocess.html#windows-popen-helpers">17.1.3. Windows Popen Helpers</a><ul>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#constants">17.1.3.1. Constants</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="subprocess.html#replacing-older-functions-with-the-subprocess-module">17.1.4. Replacing Older Functions with the <code class="xref py py-mod docutils literal notranslate"><span class="pre">subprocess</span></code> Module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#replacing-bin-sh-shell-backquote">17.1.4.1. Replacing /bin/sh shell backquote</a></li>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#replacing-shell-pipeline">17.1.4.2. Replacing shell pipeline</a></li>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#replacing-os-system">17.1.4.3. Replacing <code class="xref py py-func docutils literal notranslate"><span class="pre">os.system()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#replacing-the-os-spawn-family">17.1.4.4. Replacing the <code class="xref py py-func docutils literal notranslate"><span class="pre">os.spawn</span></code> family</a></li>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#replacing-os-popen-os-popen2-os-popen3">17.1.4.5. Replacing <code class="xref py py-func docutils literal notranslate"><span class="pre">os.popen()</span></code>, <code class="xref py py-func docutils literal notranslate"><span class="pre">os.popen2()</span></code>, <code class="xref py py-func docutils literal notranslate"><span class="pre">os.popen3()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#replacing-functions-from-the-popen2-module">17.1.4.6. Replacing functions from the <code class="xref py py-mod docutils literal notranslate"><span class="pre">popen2</span></code> module</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="subprocess.html#notes">17.1.5. Notes</a><ul>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#converting-an-argument-sequence-to-a-string-on-windows">17.1.5.1. Converting an argument sequence to a string on Windows</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="socket.html">17.2. <code class="xref py py-mod docutils literal notranslate"><span class="pre">socket</span></code> — Low-level networking interface</a><ul>
<li class="toctree-l2"><a class="reference internal" href="socket.html#socket-objects">17.2.1. Socket Objects</a></li>
<li class="toctree-l2"><a class="reference internal" href="socket.html#example">17.2.2. Example</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="ssl.html">17.3. <code class="xref py py-mod docutils literal notranslate"><span class="pre">ssl</span></code> — TLS/SSL wrapper for socket objects</a><ul>
<li class="toctree-l2"><a class="reference internal" href="ssl.html#functions-constants-and-exceptions">17.3.1. Functions, Constants, and Exceptions</a><ul>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#socket-creation">17.3.1.1. Socket creation</a></li>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#context-creation">17.3.1.2. Context creation</a></li>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#random-generation">17.3.1.3. Random generation</a></li>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#certificate-handling">17.3.1.4. Certificate handling</a></li>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#constants">17.3.1.5. Constants</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="ssl.html#ssl-sockets">17.3.2. SSL Sockets</a></li>
<li class="toctree-l2"><a class="reference internal" href="ssl.html#ssl-contexts">17.3.3. SSL Contexts</a></li>
<li class="toctree-l2"><a class="reference internal" href="ssl.html#certificates">17.3.4. Certificates</a><ul>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#certificate-chains">17.3.4.1. Certificate chains</a></li>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#ca-certificates">17.3.4.2. CA certificates</a></li>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#combined-key-and-certificate">17.3.4.3. Combined key and certificate</a></li>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#self-signed-certificates">17.3.4.4. Self-signed certificates</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="ssl.html#examples">17.3.5. Examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#testing-for-ssl-support">17.3.5.1. Testing for SSL support</a></li>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#client-side-operation">17.3.5.2. Client-side operation</a></li>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#server-side-operation">17.3.5.3. Server-side operation</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="ssl.html#notes-on-non-blocking-sockets">17.3.6. Notes on non-blocking sockets</a></li>
<li class="toctree-l2"><a class="reference internal" href="ssl.html#security-considerations">17.3.7. Security considerations</a><ul>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#best-defaults">17.3.7.1. Best defaults</a></li>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#manual-settings">17.3.7.2. Manual settings</a><ul>
<li class="toctree-l4"><a class="reference internal" href="ssl.html#verifying-certificates">17.3.7.2.1. Verifying certificates</a></li>
<li class="toctree-l4"><a class="reference internal" href="ssl.html#protocol-versions">17.3.7.2.2. Protocol versions</a></li>
<li class="toctree-l4"><a class="reference internal" href="ssl.html#cipher-selection">17.3.7.2.3. Cipher selection</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#multi-processing">17.3.7.3. Multi-processing</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="ssl.html#libressl-support">17.3.8. LibreSSL support</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="signal.html">17.4. <code class="xref py py-mod docutils literal notranslate"><span class="pre">signal</span></code> — Set handlers for asynchronous events</a><ul>
<li class="toctree-l2"><a class="reference internal" href="signal.html#example">17.4.1. Example</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="popen2.html">17.5. <code class="xref py py-mod docutils literal notranslate"><span class="pre">popen2</span></code> — Subprocesses with accessible I/O streams</a><ul>
<li class="toctree-l2"><a class="reference internal" href="popen2.html#popen3-and-popen4-objects">17.5.1. Popen3 and Popen4 Objects</a></li>
<li class="toctree-l2"><a class="reference internal" href="popen2.html#flow-control-issues">17.5.2. Flow Control Issues</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="asyncore.html">17.6. <code class="xref py py-mod docutils literal notranslate"><span class="pre">asyncore</span></code> — Asynchronous socket handler</a><ul>
<li class="toctree-l2"><a class="reference internal" href="asyncore.html#asyncore-example-basic-http-client">17.6.1. asyncore Example basic HTTP client</a></li>
<li class="toctree-l2"><a class="reference internal" href="asyncore.html#asyncore-example-basic-echo-server">17.6.2. asyncore Example basic echo server</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="asynchat.html">17.7. <code class="xref py py-mod docutils literal notranslate"><span class="pre">asynchat</span></code> — Asynchronous socket command/response handler</a><ul>
<li class="toctree-l2"><a class="reference internal" href="asynchat.html#asynchat-auxiliary-classes">17.7.1. asynchat - Auxiliary Classes</a></li>
<li class="toctree-l2"><a class="reference internal" href="asynchat.html#asynchat-example">17.7.2. asynchat Example</a></li>
</ul>
</li>
</ul>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="rlcompleter.html"
                        title="previous chapter">16.9. <code class="xref py py-mod docutils literal notranslate"><span class="pre">rlcompleter</span></code> — Completion function for GNU readline</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="subprocess.html"
                        title="next chapter">17.1. <code class="xref py py-mod docutils literal notranslate"><span class="pre">subprocess</span></code> — Subprocess management</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/library/ipc.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="subprocess.html" title="17.1. subprocess — Subprocess management"
             >next</a> |</li>
        <li class="right" >
          <a href="rlcompleter.html" title="16.9. rlcompleter — Completion function for GNU readline"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &#187;</li>
        <li>
          <a href="../index.html">Python 2.7.17 documentation</a> &#187;
        </li>

          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li> 
      </ul>
    </div>  
    <div class="footer">
    &copy; <a href="../copyright.html">Copyright</a> 1990-2019, Python Software Foundation.
    <br />
    The Python Software Foundation is a non-profit corporation.
    <a href="https://www.python.org/psf/donations/">Please donate.</a>
    <br />
    Last updated on Oct 19, 2019.
    <a href="../bugs.html">Found a bug</a>?
    <br />
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.0.1.
    </div>

  </body>
</html>