Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > by-pkgid > 3ba3bd1608c672ba2129b098a48e9e4d > files > 719

python3-docs-3.2.2-3mdv2010.2.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>17. Interprocess Communication and Networking &mdash; Python v3.2.2 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '3.2.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </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/sidebar.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python v3.2.2 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="Python v3.2.2 documentation" href="../index.html" />
    <link rel="up" title="The Python Standard Library" href="index.html" />
    <link rel="next" title="17.1. subprocess — Subprocess management" href="subprocess.html" />
    <link rel="prev" title="16.10. _dummy_thread — Drop-in replacement for the _thread module" href="_dummy_thread.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
 

  </head>
  <body>
    <div class="related">
      <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="_dummy_thread.html" title="16.10. _dummy_thread — Drop-in replacement for the _thread module"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="../index.html">Python v3.2.2 documentation</a> &raquo;</li>

          <li><a href="index.html" accesskey="U">The Python Standard Library</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <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."><tt class="xref py py-mod docutils literal"><span class="pre">signal</span></tt></a> and <a class="reference internal" href="subprocess.html#module-subprocess" title="subprocess: Subprocess management."><tt class="xref py py-mod docutils literal"><span class="pre">subprocess</span></tt></a>.  Other modules support networking protocols
that two or more processes can used 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. <tt class="docutils literal"><span class="pre">subprocess</span></tt> &#8212; Subprocess management</a><ul>
<li class="toctree-l2"><a class="reference internal" href="subprocess.html#using-the-subprocess-module">17.1.1. Using the subprocess Module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#convenience-functions">17.1.1.1. Convenience Functions</a></li>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#exceptions">17.1.1.2. Exceptions</a></li>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#security">17.1.1.3. 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 subprocess 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 <tt class="docutils literal"><span class="pre">os.system()</span></tt></a></li>
<li class="toctree-l3"><a class="reference internal" href="subprocess.html#replacing-the-os-spawn-family">17.1.4.4. Replacing the <tt class="docutils literal"><span class="pre">os.spawn</span></tt> 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 <tt class="docutils literal"><span class="pre">os.popen()</span></tt>, <tt class="docutils literal"><span class="pre">os.popen2()</span></tt>, <tt class="docutils literal"><span class="pre">os.popen3()</span></tt></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 <tt class="docutils literal"><span class="pre">popen2</span></tt> 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. <tt class="docutils literal"><span class="pre">socket</span></tt> &#8212; Low-level networking interface</a><ul>
<li class="toctree-l2"><a class="reference internal" href="socket.html#socket-families">17.2.1. Socket families</a></li>
<li class="toctree-l2"><a class="reference internal" href="socket.html#module-contents">17.2.2. Module contents</a></li>
<li class="toctree-l2"><a class="reference internal" href="socket.html#socket-objects">17.2.3. Socket Objects</a></li>
<li class="toctree-l2"><a class="reference internal" href="socket.html#notes-on-socket-timeouts">17.2.4. Notes on socket timeouts</a><ul>
<li class="toctree-l3"><a class="reference internal" href="socket.html#timeouts-and-the-connect-method">17.2.4.1. Timeouts and the <tt class="docutils literal"><span class="pre">connect</span></tt> method</a></li>
<li class="toctree-l3"><a class="reference internal" href="socket.html#timeouts-and-the-accept-method">17.2.4.2. Timeouts and the <tt class="docutils literal"><span class="pre">accept</span></tt> method</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="socket.html#example">17.2.5. Example</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="ssl.html">17.3. <tt class="docutils literal"><span class="pre">ssl</span></tt> &#8212; 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#random-generation">17.3.1.2. Random generation</a></li>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#certificate-handling">17.3.1.3. Certificate handling</a></li>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#constants">17.3.1.4. 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#verifying-certificates">17.3.7.1. Verifying certificates</a></li>
<li class="toctree-l3"><a class="reference internal" href="ssl.html#protocol-versions">17.3.7.2. Protocol versions</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="signal.html">17.4. <tt class="docutils literal"><span class="pre">signal</span></tt> &#8212; 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="asyncore.html">17.5. <tt class="docutils literal"><span class="pre">asyncore</span></tt> &#8212; Asynchronous socket handler</a><ul>
<li class="toctree-l2"><a class="reference internal" href="asyncore.html#asyncore-example-basic-http-client">17.5.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.5.2. asyncore Example basic echo server</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="asynchat.html">17.6. <tt class="docutils literal"><span class="pre">asynchat</span></tt> &#8212; Asynchronous socket command/response handler</a><ul>
<li class="toctree-l2"><a class="reference internal" href="asynchat.html#asynchat-auxiliary-classes">17.6.1. asynchat - Auxiliary Classes</a></li>
<li class="toctree-l2"><a class="reference internal" href="asynchat.html#asynchat-example">17.6.2. asynchat Example</a></li>
</ul>
</li>
</ul>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="_dummy_thread.html"
                        title="previous chapter">16.10. <tt class="docutils literal docutils literal docutils literal"><span class="pre">_dummy_thread</span></tt> &#8212; Drop-in replacement for the <tt class="docutils literal docutils literal docutils literal"><span class="pre">_thread</span></tt> module</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="subprocess.html"
                        title="next chapter">17.1. <tt class="docutils literal"><span class="pre">subprocess</span></tt> &#8212; Subprocess management</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
  <li><a href="../bugs.html">Report a Bug</a></li>
  <li><a href="../_sources/library/ipc.txt"
         rel="nofollow">Show Source</a></li>
</ul>

<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <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="_dummy_thread.html" title="16.10. _dummy_thread — Drop-in replacement for the _thread module"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="../index.html">Python v3.2.2 documentation</a> &raquo;</li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
    &copy; <a href="../copyright.html">Copyright</a> 1990-2011, Python Software Foundation.
    <br />
    The Python Software Foundation is a non-profit corporation.  
    <a href="http://www.python.org/psf/donations/">Please donate.</a>
    <br />
    Last updated on Sep 04, 2011.
    <a href="../bugs.html">Found a bug</a>?
    <br />
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
    </div>

  </body>
</html>