Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-backports > by-pkgid > 3ba3bd1608c672ba2129b098a48e9e4d > files > 780

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>16.6. readline — GNU readline interface &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="16. Optional Operating System Services" href="someos.html" />
    <link rel="next" title="16.7. rlcompleter — Completion function for GNU readline" href="rlcompleter.html" />
    <link rel="prev" title="16.5. mmap — Memory-mapped file support" href="mmap.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="rlcompleter.html" title="16.7. rlcompleter — Completion function for GNU readline"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="mmap.html" title="16.5. mmap — Memory-mapped file support"
             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" >The Python Standard Library</a> &raquo;</li>
          <li><a href="someos.html" accesskey="U">16. Optional Operating System Services</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-readline">
<span id="readline-gnu-readline-interface"></span><h1>16.6. <a class="reference internal" href="#module-readline" title="readline: GNU readline support for Python. (Unix)"><tt class="xref py py-mod docutils literal"><span class="pre">readline</span></tt></a> &#8212; GNU readline interface<a class="headerlink" href="#module-readline" title="Permalink to this headline">¶</a></h1>
<p><em>Platforms: </em>Unix</p>
<p>The <a class="reference internal" href="#module-readline" title="readline: GNU readline support for Python. (Unix)"><tt class="xref py py-mod docutils literal"><span class="pre">readline</span></tt></a> module defines a number of functions to facilitate
completion and reading/writing of history files from the Python interpreter.
This module can be used directly or via the <a class="reference internal" href="rlcompleter.html#module-rlcompleter" title="rlcompleter: Python identifier completion, suitable for the GNU readline library."><tt class="xref py py-mod docutils literal"><span class="pre">rlcompleter</span></tt></a> module.  Settings
made using  this module affect the behaviour of both the interpreter&#8217;s
interactive prompt  and the prompts offered by the built-in <a class="reference internal" href="functions.html#input" title="input"><tt class="xref py py-func docutils literal"><span class="pre">input()</span></tt></a>
function.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>On MacOS X the <a class="reference internal" href="#module-readline" title="readline: GNU readline support for Python. (Unix)"><tt class="xref py py-mod docutils literal"><span class="pre">readline</span></tt></a> module can be implemented using
the <tt class="docutils literal"><span class="pre">libedit</span></tt> library instead of GNU readline.</p>
<p class="last">The configuration file for <tt class="docutils literal"><span class="pre">libedit</span></tt> is different from that
of GNU readline. If you programmatically load configuration strings
you can check for the text &#8220;libedit&#8221; in <tt class="xref py py-const docutils literal"><span class="pre">readline.__doc__</span></tt>
to differentiate between GNU readline and libedit.</p>
</div>
<p>The <a class="reference internal" href="#module-readline" title="readline: GNU readline support for Python. (Unix)"><tt class="xref py py-mod docutils literal"><span class="pre">readline</span></tt></a> module defines the following functions:</p>
<dl class="function">
<dt id="readline.parse_and_bind">
<tt class="descclassname">readline.</tt><tt class="descname">parse_and_bind</tt><big>(</big><em>string</em><big>)</big><a class="headerlink" href="#readline.parse_and_bind" title="Permalink to this definition">¶</a></dt>
<dd><p>Parse and execute single line of a readline init file.</p>
</dd></dl>

<dl class="function">
<dt id="readline.get_line_buffer">
<tt class="descclassname">readline.</tt><tt class="descname">get_line_buffer</tt><big>(</big><big>)</big><a class="headerlink" href="#readline.get_line_buffer" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current contents of the line buffer.</p>
</dd></dl>

<dl class="function">
<dt id="readline.insert_text">
<tt class="descclassname">readline.</tt><tt class="descname">insert_text</tt><big>(</big><em>string</em><big>)</big><a class="headerlink" href="#readline.insert_text" title="Permalink to this definition">¶</a></dt>
<dd><p>Insert text into the command line.</p>
</dd></dl>

<dl class="function">
<dt id="readline.read_init_file">
<tt class="descclassname">readline.</tt><tt class="descname">read_init_file</tt><big>(</big><span class="optional">[</span><em>filename</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#readline.read_init_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Parse a readline initialization file. The default filename is the last filename
used.</p>
</dd></dl>

<dl class="function">
<dt id="readline.read_history_file">
<tt class="descclassname">readline.</tt><tt class="descname">read_history_file</tt><big>(</big><span class="optional">[</span><em>filename</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#readline.read_history_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Load a readline history file. The default filename is <tt class="file docutils literal"><span class="pre">~/.history</span></tt>.</p>
</dd></dl>

<dl class="function">
<dt id="readline.write_history_file">
<tt class="descclassname">readline.</tt><tt class="descname">write_history_file</tt><big>(</big><span class="optional">[</span><em>filename</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#readline.write_history_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Save a readline history file. The default filename is <tt class="file docutils literal"><span class="pre">~/.history</span></tt>.</p>
</dd></dl>

<dl class="function">
<dt id="readline.clear_history">
<tt class="descclassname">readline.</tt><tt class="descname">clear_history</tt><big>(</big><big>)</big><a class="headerlink" href="#readline.clear_history" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear the current history.  (Note: this function is not available if the
installed version of GNU readline doesn&#8217;t support it.)</p>
</dd></dl>

<dl class="function">
<dt id="readline.get_history_length">
<tt class="descclassname">readline.</tt><tt class="descname">get_history_length</tt><big>(</big><big>)</big><a class="headerlink" href="#readline.get_history_length" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the desired length of the history file.  Negative values imply unlimited
history file size.</p>
</dd></dl>

<dl class="function">
<dt id="readline.set_history_length">
<tt class="descclassname">readline.</tt><tt class="descname">set_history_length</tt><big>(</big><em>length</em><big>)</big><a class="headerlink" href="#readline.set_history_length" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the number of lines to save in the history file. <a class="reference internal" href="#readline.write_history_file" title="readline.write_history_file"><tt class="xref py py-func docutils literal"><span class="pre">write_history_file()</span></tt></a>
uses this value to truncate the history file when saving.  Negative values imply
unlimited history file size.</p>
</dd></dl>

<dl class="function">
<dt id="readline.get_current_history_length">
<tt class="descclassname">readline.</tt><tt class="descname">get_current_history_length</tt><big>(</big><big>)</big><a class="headerlink" href="#readline.get_current_history_length" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the number of lines currently in the history.  (This is different from
<a class="reference internal" href="#readline.get_history_length" title="readline.get_history_length"><tt class="xref py py-func docutils literal"><span class="pre">get_history_length()</span></tt></a>, which returns the maximum number of lines that will
be written to a history file.)</p>
</dd></dl>

<dl class="function">
<dt id="readline.get_history_item">
<tt class="descclassname">readline.</tt><tt class="descname">get_history_item</tt><big>(</big><em>index</em><big>)</big><a class="headerlink" href="#readline.get_history_item" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current contents of history item at <em>index</em>.</p>
</dd></dl>

<dl class="function">
<dt id="readline.remove_history_item">
<tt class="descclassname">readline.</tt><tt class="descname">remove_history_item</tt><big>(</big><em>pos</em><big>)</big><a class="headerlink" href="#readline.remove_history_item" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove history item specified by its position from the history.</p>
</dd></dl>

<dl class="function">
<dt id="readline.replace_history_item">
<tt class="descclassname">readline.</tt><tt class="descname">replace_history_item</tt><big>(</big><em>pos</em>, <em>line</em><big>)</big><a class="headerlink" href="#readline.replace_history_item" title="Permalink to this definition">¶</a></dt>
<dd><p>Replace history item specified by its position with the given line.</p>
</dd></dl>

<dl class="function">
<dt id="readline.redisplay">
<tt class="descclassname">readline.</tt><tt class="descname">redisplay</tt><big>(</big><big>)</big><a class="headerlink" href="#readline.redisplay" title="Permalink to this definition">¶</a></dt>
<dd><p>Change what&#8217;s displayed on the screen to reflect the current contents of the
line buffer.</p>
</dd></dl>

<dl class="function">
<dt id="readline.set_startup_hook">
<tt class="descclassname">readline.</tt><tt class="descname">set_startup_hook</tt><big>(</big><span class="optional">[</span><em>function</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#readline.set_startup_hook" title="Permalink to this definition">¶</a></dt>
<dd><p>Set or remove the startup_hook function.  If <em>function</em> is specified, it will be
used as the new startup_hook function; if omitted or <tt class="xref docutils literal"><span class="pre">None</span></tt>, any hook function
already installed is removed.  The startup_hook function is called with no
arguments just before readline prints the first prompt.</p>
</dd></dl>

<dl class="function">
<dt id="readline.set_pre_input_hook">
<tt class="descclassname">readline.</tt><tt class="descname">set_pre_input_hook</tt><big>(</big><span class="optional">[</span><em>function</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#readline.set_pre_input_hook" title="Permalink to this definition">¶</a></dt>
<dd><p>Set or remove the pre_input_hook function.  If <em>function</em> is specified, it will
be used as the new pre_input_hook function; if omitted or <tt class="xref docutils literal"><span class="pre">None</span></tt>, any hook
function already installed is removed.  The pre_input_hook function is called
with no arguments after the first prompt has been printed and just before
readline starts reading input characters.</p>
</dd></dl>

<dl class="function">
<dt id="readline.set_completer">
<tt class="descclassname">readline.</tt><tt class="descname">set_completer</tt><big>(</big><span class="optional">[</span><em>function</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#readline.set_completer" title="Permalink to this definition">¶</a></dt>
<dd><p>Set or remove the completer function.  If <em>function</em> is specified, it will be
used as the new completer function; if omitted or <tt class="xref docutils literal"><span class="pre">None</span></tt>, any completer
function already installed is removed.  The completer function is called as
<tt class="docutils literal"><span class="pre">function(text,</span> <span class="pre">state)</span></tt>, for <em>state</em> in <tt class="docutils literal"><span class="pre">0</span></tt>, <tt class="docutils literal"><span class="pre">1</span></tt>, <tt class="docutils literal"><span class="pre">2</span></tt>, ..., until it
returns a non-string value.  It should return the next possible completion
starting with <em>text</em>.</p>
</dd></dl>

<dl class="function">
<dt id="readline.get_completer">
<tt class="descclassname">readline.</tt><tt class="descname">get_completer</tt><big>(</big><big>)</big><a class="headerlink" href="#readline.get_completer" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the completer function, or <tt class="xref docutils literal"><span class="pre">None</span></tt> if no completer function has been set.</p>
</dd></dl>

<dl class="function">
<dt id="readline.get_completion_type">
<tt class="descclassname">readline.</tt><tt class="descname">get_completion_type</tt><big>(</big><big>)</big><a class="headerlink" href="#readline.get_completion_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the type of completion being attempted.</p>
</dd></dl>

<dl class="function">
<dt id="readline.get_begidx">
<tt class="descclassname">readline.</tt><tt class="descname">get_begidx</tt><big>(</big><big>)</big><a class="headerlink" href="#readline.get_begidx" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the beginning index of the readline tab-completion scope.</p>
</dd></dl>

<dl class="function">
<dt id="readline.get_endidx">
<tt class="descclassname">readline.</tt><tt class="descname">get_endidx</tt><big>(</big><big>)</big><a class="headerlink" href="#readline.get_endidx" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the ending index of the readline tab-completion scope.</p>
</dd></dl>

<dl class="function">
<dt id="readline.set_completer_delims">
<tt class="descclassname">readline.</tt><tt class="descname">set_completer_delims</tt><big>(</big><em>string</em><big>)</big><a class="headerlink" href="#readline.set_completer_delims" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the readline word delimiters for tab-completion.</p>
</dd></dl>

<dl class="function">
<dt id="readline.get_completer_delims">
<tt class="descclassname">readline.</tt><tt class="descname">get_completer_delims</tt><big>(</big><big>)</big><a class="headerlink" href="#readline.get_completer_delims" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the readline word delimiters for tab-completion.</p>
</dd></dl>

<dl class="function">
<dt id="readline.set_completion_display_matches_hook">
<tt class="descclassname">readline.</tt><tt class="descname">set_completion_display_matches_hook</tt><big>(</big><span class="optional">[</span><em>function</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#readline.set_completion_display_matches_hook" title="Permalink to this definition">¶</a></dt>
<dd><p>Set or remove the completion display function.  If <em>function</em> is
specified, it will be used as the new completion display function;
if omitted or <tt class="xref docutils literal"><span class="pre">None</span></tt>, any completion display function already
installed is removed.  The completion display function is called as
<tt class="docutils literal"><span class="pre">function(substitution,</span> <span class="pre">[matches],</span> <span class="pre">longest_match_length)</span></tt> once
each time matches need to be displayed.</p>
</dd></dl>

<dl class="function">
<dt id="readline.add_history">
<tt class="descclassname">readline.</tt><tt class="descname">add_history</tt><big>(</big><em>line</em><big>)</big><a class="headerlink" href="#readline.add_history" title="Permalink to this definition">¶</a></dt>
<dd><p>Append a line to the history buffer, as if it was the last line typed.</p>
</dd></dl>

<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt>Module <a class="reference internal" href="rlcompleter.html#module-rlcompleter" title="rlcompleter: Python identifier completion, suitable for the GNU readline library."><tt class="xref py py-mod docutils literal"><span class="pre">rlcompleter</span></tt></a></dt>
<dd>Completion of Python identifiers at the interactive prompt.</dd>
</dl>
</div>
<div class="section" id="example">
<span id="readline-example"></span><h2>16.6.1. Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h2>
<p>The following example demonstrates how to use the <a class="reference internal" href="#module-readline" title="readline: GNU readline support for Python. (Unix)"><tt class="xref py py-mod docutils literal"><span class="pre">readline</span></tt></a> module&#8217;s
history reading and writing functions to automatically load and save a history
file named <tt class="file docutils literal"><span class="pre">.pyhist</span></tt> from the user&#8217;s home directory.  The code below would
normally be executed automatically during interactive sessions from the user&#8217;s
<span class="target" id="index-0"></span><a class="reference internal" href="../using/cmdline.html#envvar-PYTHONSTARTUP"><tt class="xref std std-envvar docutils literal"><span class="pre">PYTHONSTARTUP</span></tt></a> file.</p>
<div class="highlight-python3"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">readline</span>
<span class="n">histfile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">expanduser</span><span class="p">(</span><span class="s">&quot;~&quot;</span><span class="p">),</span> <span class="s">&quot;.pyhist&quot;</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span>
    <span class="n">readline</span><span class="o">.</span><span class="n">read_history_file</span><span class="p">(</span><span class="n">histfile</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">IOError</span><span class="p">:</span>
    <span class="k">pass</span>
<span class="kn">import</span> <span class="nn">atexit</span>
<span class="n">atexit</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">readline</span><span class="o">.</span><span class="n">write_history_file</span><span class="p">,</span> <span class="n">histfile</span><span class="p">)</span>
<span class="k">del</span> <span class="n">os</span><span class="p">,</span> <span class="n">histfile</span>
</pre></div>
</div>
<p>The following example extends the <a class="reference internal" href="code.html#code.InteractiveConsole" title="code.InteractiveConsole"><tt class="xref py py-class docutils literal"><span class="pre">code.InteractiveConsole</span></tt></a> class to
support history save/restore.</p>
<div class="highlight-python3"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">code</span>
<span class="kn">import</span> <span class="nn">readline</span>
<span class="kn">import</span> <span class="nn">atexit</span>
<span class="kn">import</span> <span class="nn">os</span>

<span class="k">class</span> <span class="nc">HistoryConsole</span><span class="p">(</span><span class="n">code</span><span class="o">.</span><span class="n">InteractiveConsole</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="nb">locals</span><span class="o">=</span><span class="k">None</span><span class="p">,</span> <span class="n">filename</span><span class="o">=</span><span class="s">&quot;&lt;console&gt;&quot;</span><span class="p">,</span>
                 <span class="n">histfile</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">expanduser</span><span class="p">(</span><span class="s">&quot;~/.console-history&quot;</span><span class="p">)):</span>
        <span class="n">code</span><span class="o">.</span><span class="n">InteractiveConsole</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="nb">locals</span><span class="p">,</span> <span class="n">filename</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">init_history</span><span class="p">(</span><span class="n">histfile</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">init_history</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">histfile</span><span class="p">):</span>
        <span class="n">readline</span><span class="o">.</span><span class="n">parse_and_bind</span><span class="p">(</span><span class="s">&quot;tab: complete&quot;</span><span class="p">)</span>
        <span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">readline</span><span class="p">,</span> <span class="s">&quot;read_history_file&quot;</span><span class="p">):</span>
            <span class="k">try</span><span class="p">:</span>
                <span class="n">readline</span><span class="o">.</span><span class="n">read_history_file</span><span class="p">(</span><span class="n">histfile</span><span class="p">)</span>
            <span class="k">except</span> <span class="ne">IOError</span><span class="p">:</span>
                <span class="k">pass</span>
            <span class="n">atexit</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">save_history</span><span class="p">,</span> <span class="n">histfile</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">save_history</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">histfile</span><span class="p">):</span>
        <span class="n">readline</span><span class="o">.</span><span class="n">write_history_file</span><span class="p">(</span><span class="n">histfile</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">16.6. <tt class="docutils literal"><span class="pre">readline</span></tt> &#8212; GNU readline interface</a><ul>
<li><a class="reference internal" href="#example">16.6.1. Example</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="mmap.html"
                        title="previous chapter">16.5. <tt class="docutils literal docutils literal docutils literal"><span class="pre">mmap</span></tt> &#8212; Memory-mapped file support</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="rlcompleter.html"
                        title="next chapter">16.7. <tt class="docutils literal docutils literal"><span class="pre">rlcompleter</span></tt> &#8212; Completion function for GNU readline</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/readline.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="rlcompleter.html" title="16.7. rlcompleter — Completion function for GNU readline"
             >next</a> |</li>
        <li class="right" >
          <a href="mmap.html" title="16.5. mmap — Memory-mapped file support"
             >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>
          <li><a href="someos.html" >16. Optional Operating System Services</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>