pytest2/py/doc/_build/html/path.html

366 lines
27 KiB
HTML

<!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>3. py.path &mdash; py lib v1.0.0b1 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: '1.0.0b1',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="py lib v1.0.0b1 documentation" href="index.html" />
<link rel="next" title="4. py.code" href="code.html" />
<link rel="prev" title="2. py.execnet" href="execnet.html" />
</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="code.html" title="4. py.code"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="execnet.html" title="2. py.execnet"
accesskey="P">previous</a> |</li>
<li><a href="index.html">py lib v1.0.0b1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="py-path">
<h1>3. py.path<a class="headerlink" href="#py-path" title="Permalink to this headline"></a></h1>
<p>The &#8216;py&#8217; lib provides a uniform high-level api to deal with filesystems
and filesystem-like interfaces: <tt class="docutils literal"><span class="pre">py.path</span></tt>. It aims to offer a central
object to fs-like object trees (reading from and writing to files, adding
files/directories, examining the types and structure, etc.), and out-of-the-box
provides a number of implementations of this API.</p>
<div class="section" id="path-implementations-provided-by-py-path">
<h2>3.1. Path implementations provided by <tt class="docutils literal"><span class="pre">py.path</span></tt><a class="headerlink" href="#path-implementations-provided-by-py-path" title="Permalink to this headline"></a></h2>
<div class="section" id="py-path-local">
<h3>3.1.1. <tt class="docutils literal"><span class="pre">py.path.local</span></tt><a class="headerlink" href="#py-path-local" title="Permalink to this headline"></a></h3>
<p>The first and most obvious of the implementations is a wrapper around a local
filesystem. It&#8217;s just a bit nicer in usage than the regular Python APIs, and
of course all the functionality is bundled together rather than spread over a
number of modules.</p>
<p>Example usage, here we use the <tt class="docutils literal"><span class="pre">py.test.ensuretemp()</span></tt> function to create
a <tt class="docutils literal"><span class="pre">py.path.local</span></tt> object for us (which wraps a directory):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">py</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">temppath</span> <span class="o">=</span> <span class="n">py</span><span class="o">.</span><span class="n">test</span><span class="o">.</span><span class="n">ensuretemp</span><span class="p">(</span><span class="s">&#39;py.path_documentation&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">foopath</span> <span class="o">=</span> <span class="n">temppath</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s">&#39;foo&#39;</span><span class="p">)</span> <span class="c"># get child &#39;foo&#39; (lazily)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">foopath</span><span class="o">.</span><span class="n">check</span><span class="p">()</span> <span class="c"># check if child &#39;foo&#39; exists</span>
<span class="go">False</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">foopath</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">&#39;bar&#39;</span><span class="p">)</span> <span class="c"># write some data to it</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">foopath</span><span class="o">.</span><span class="n">check</span><span class="p">()</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">foopath</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
<span class="go">&#39;bar&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">foofile</span> <span class="o">=</span> <span class="n">foopath</span><span class="o">.</span><span class="n">open</span><span class="p">()</span> <span class="c"># return a &#39;real&#39; file object</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">foofile</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span>
<span class="go">&#39;b&#39;</span>
</pre></div>
</div>
</div>
<div class="section" id="py-path-svnurl-and-py-path-svnwc">
<h3>3.1.2. <tt class="docutils literal"><span class="pre">py.path.svnurl</span></tt> and <tt class="docutils literal"><span class="pre">py.path.svnwc</span></tt><a class="headerlink" href="#py-path-svnurl-and-py-path-svnwc" title="Permalink to this headline"></a></h3>
<p>Two other <tt class="docutils literal"><span class="pre">py.path</span></tt> implementations that the py lib provides wrap the
popular <a class="reference external" href="http://subversion.tigris.org/">Subversion</a> revision control system: the first (called &#8216;svnurl&#8217;)
by interfacing with a remote server, the second by wrapping a local checkout.
Both allow you to access relatively advanced features such as metadata and
versioning, and both in a way more user-friendly manner than existing other
solutions.</p>
<p>Some example usage of <tt class="docutils literal"><span class="pre">py.path.svnurl</span></tt>:</p>
<div class="highlight-python"><pre>.. &gt;&gt;&gt; import py
.. &gt;&gt;&gt; if not py.test.config.option.urlcheck: raise ValueError('skipchunk')
&gt;&gt;&gt; url = py.path.svnurl('http://codespeak.net/svn/py')
&gt;&gt;&gt; info = url.info()
&gt;&gt;&gt; info.kind
'dir'
&gt;&gt;&gt; firstentry = url.log()[-1]
&gt;&gt;&gt; import time
&gt;&gt;&gt; time.strftime('%Y-%m-%d', time.gmtime(firstentry.date))
'2004-10-02'</pre>
</div>
<p>Example usage of <tt class="docutils literal"><span class="pre">py.path.svnwc</span></tt>:</p>
<div class="highlight-python"><pre>.. &gt;&gt;&gt; if not py.test.config.option.urlcheck: raise ValueError('skipchunk')
&gt;&gt;&gt; temp = py.test.ensuretemp('py.path_documentation')
&gt;&gt;&gt; wc = py.path.svnwc(temp.join('svnwc'))
&gt;&gt;&gt; wc.checkout('http://codespeak.net/svn/py/dist/py/path/local')
&gt;&gt;&gt; wc.join('local.py').check()
True</pre>
</div>
</div>
</div>
<div class="section" id="common-vs-specific-api">
<h2>3.2. Common vs. specific API<a class="headerlink" href="#common-vs-specific-api" title="Permalink to this headline"></a></h2>
<p>All Path objects support a common set of operations, suitable
for many use cases and allowing to transparently switch the
path object within an application (e.g. from &#8220;local&#8221; to &#8220;svnwc&#8221;).
The common set includes functions such as <cite>path.read()</cite> to read all data
from a file, <cite>path.write()</cite> to write data, <cite>path.listdir()</cite> to get a list
of directory entries, <cite>path.check()</cite> to check if a node exists
and is of a particular type, <cite>path.join()</cite> to get
to a (grand)child, <cite>path.visit()</cite> to recursively walk through a node&#8217;s
children, etc. Only things that are not common on &#8216;normal&#8217; filesystems (yet),
such as handling metadata (e.g. the Subversion &#8220;properties&#8221;) require
using specific APIs.</p>
<div class="section" id="examples">
<h3>3.2.1. Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h3>
<p>A quick &#8216;cookbook&#8217; of small examples that will be useful &#8216;in real life&#8217;,
which also presents parts of the &#8216;common&#8217; API, and shows some non-common
methods:</p>
<div class="section" id="searching-txt-files">
<h4>3.2.1.1. Searching <cite>.txt</cite> files<a class="headerlink" href="#searching-txt-files" title="Permalink to this headline"></a></h4>
<p>Search for a particular string inside all files with a .txt extension in a
specific directory.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">dirpath</span> <span class="o">=</span> <span class="n">temppath</span><span class="o">.</span><span class="n">ensure</span><span class="p">(</span><span class="s">&#39;testdir&#39;</span><span class="p">,</span> <span class="nb">dir</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dirpath</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s">&#39;textfile1.txt&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">&#39;foo bar baz&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dirpath</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s">&#39;textfile2.txt&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">&#39;frob bar spam eggs&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">subdir</span> <span class="o">=</span> <span class="n">dirpath</span><span class="o">.</span><span class="n">ensure</span><span class="p">(</span><span class="s">&#39;subdir&#39;</span><span class="p">,</span> <span class="nb">dir</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">subdir</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s">&#39;textfile1.txt&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">&#39;foo baz&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">subdir</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s">&#39;textfile2.txt&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">&#39;spam eggs spam foo bar spam&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">results</span> <span class="o">=</span> <span class="p">[]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">fpath</span> <span class="ow">in</span> <span class="n">dirpath</span><span class="o">.</span><span class="n">visit</span><span class="p">(</span><span class="s">&#39;*.txt&#39;</span><span class="p">):</span>
<span class="gp">... </span> <span class="k">if</span> <span class="s">&#39;bar&#39;</span> <span class="ow">in</span> <span class="n">fpath</span><span class="o">.</span><span class="n">read</span><span class="p">():</span>
<span class="gp">... </span> <span class="n">results</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">fpath</span><span class="o">.</span><span class="n">basename</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">results</span><span class="o">.</span><span class="n">sort</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">results</span>
<span class="go">[&#39;textfile1.txt&#39;, &#39;textfile2.txt&#39;, &#39;textfile2.txt&#39;]</span>
</pre></div>
</div>
</div>
<div class="section" id="working-with-paths">
<h4>3.2.1.2. Working with Paths<a class="headerlink" href="#working-with-paths" title="Permalink to this headline"></a></h4>
<p>This example shows the <tt class="docutils literal"><span class="pre">py.path</span></tt> features to deal with
filesystem paths Note that the filesystem is never touched,
all operations are performed on a string level (so the paths
don&#8217;t have to exist, either):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">py</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">local</span><span class="p">(</span><span class="s">&#39;/foo/bar&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p2</span> <span class="o">=</span> <span class="n">p1</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s">&#39;baz/qux&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p2</span> <span class="o">==</span> <span class="n">py</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">local</span><span class="p">(</span><span class="s">&#39;/foo/bar/baz/qux&#39;</span><span class="p">)</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">sep</span> <span class="o">=</span> <span class="n">py</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">local</span><span class="o">.</span><span class="n">sep</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p2</span><span class="o">.</span><span class="n">relto</span><span class="p">(</span><span class="n">p1</span><span class="p">)</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">sep</span><span class="p">,</span> <span class="s">&#39;/&#39;</span><span class="p">)</span> <span class="c"># os-specific path sep in the string</span>
<span class="go">&#39;baz/qux&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p2</span><span class="o">.</span><span class="n">bestrelpath</span><span class="p">(</span><span class="n">p1</span><span class="p">)</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">sep</span><span class="p">,</span> <span class="s">&#39;/&#39;</span><span class="p">)</span>
<span class="go">&#39;../..&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p2</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">p2</span><span class="o">.</span><span class="n">bestrelpath</span><span class="p">(</span><span class="n">p1</span><span class="p">))</span> <span class="o">==</span> <span class="n">p1</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p3</span> <span class="o">=</span> <span class="n">p1</span> <span class="o">/</span> <span class="s">&#39;baz/qux&#39;</span> <span class="c"># the / operator allows joining, too</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p2</span> <span class="o">==</span> <span class="n">p3</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p4</span> <span class="o">=</span> <span class="n">p1</span> <span class="o">+</span> <span class="s">&quot;.py&quot;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p4</span><span class="o">.</span><span class="n">basename</span> <span class="o">==</span> <span class="s">&quot;bar.py&quot;</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p4</span><span class="o">.</span><span class="n">ext</span> <span class="o">==</span> <span class="s">&quot;.py&quot;</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p4</span><span class="o">.</span><span class="n">purebasename</span> <span class="o">==</span> <span class="s">&quot;bar&quot;</span>
<span class="go">True</span>
</pre></div>
</div>
<p>This should be possible on every implementation of <tt class="docutils literal"><span class="pre">py.path</span></tt>, so
regardless of whether the implementation wraps a UNIX filesystem, a Windows
one, or a database or object tree, these functions should be available (each
with their own notion of path seperators and dealing with conversions, etc.).</p>
</div>
<div class="section" id="checking-path-types">
<h4>3.2.1.3. Checking path types<a class="headerlink" href="#checking-path-types" title="Permalink to this headline"></a></h4>
<p>Now we will show a bit about the powerful &#8216;check()&#8217; method on paths, which
allows you to check whether a file exists, what type it is, etc.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">file1</span> <span class="o">=</span> <span class="n">temppath</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s">&#39;file1&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">file1</span><span class="o">.</span><span class="n">check</span><span class="p">()</span> <span class="c"># does it exist?</span>
<span class="go">False</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">file1</span> <span class="o">=</span> <span class="n">file1</span><span class="o">.</span><span class="n">ensure</span><span class="p">(</span><span class="nb">file</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> <span class="c"># &#39;touch&#39; the file</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">file1</span><span class="o">.</span><span class="n">check</span><span class="p">()</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">file1</span><span class="o">.</span><span class="n">check</span><span class="p">(</span><span class="nb">dir</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> <span class="c"># is it a dir?</span>
<span class="go">False</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">file1</span><span class="o">.</span><span class="n">check</span><span class="p">(</span><span class="nb">file</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> <span class="c"># or a file?</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">file1</span><span class="o">.</span><span class="n">check</span><span class="p">(</span><span class="n">ext</span><span class="o">=</span><span class="s">&#39;.txt&#39;</span><span class="p">)</span> <span class="c"># check the extension</span>
<span class="go">False</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">textfile</span> <span class="o">=</span> <span class="n">temppath</span><span class="o">.</span><span class="n">ensure</span><span class="p">(</span><span class="s">&#39;text.txt&#39;</span><span class="p">,</span> <span class="nb">file</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">textfile</span><span class="o">.</span><span class="n">check</span><span class="p">(</span><span class="n">ext</span><span class="o">=</span><span class="s">&#39;.txt&#39;</span><span class="p">)</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">file1</span><span class="o">.</span><span class="n">check</span><span class="p">(</span><span class="n">basename</span><span class="o">=</span><span class="s">&#39;file1&#39;</span><span class="p">)</span> <span class="c"># we can use all the path&#39;s properties here</span>
<span class="go">True</span>
</pre></div>
</div>
</div>
<div class="section" id="setting-svn-properties">
<h4>3.2.1.4. Setting svn-properties<a class="headerlink" href="#setting-svn-properties" title="Permalink to this headline"></a></h4>
<p>As an example of &#8216;uncommon&#8217; methods, we&#8217;ll show how to read and write
properties in an <tt class="docutils literal"><span class="pre">py.path.svnwc</span></tt> instance:</p>
<div class="highlight-python"><pre>.. &gt;&gt;&gt; if not py.test.config.option.urlcheck: raise ValueError('skipchunk')
&gt;&gt;&gt; wc.propget('foo')
''
&gt;&gt;&gt; wc.propset('foo', 'bar')
&gt;&gt;&gt; wc.propget('foo')
'bar'
&gt;&gt;&gt; len(wc.status().prop_modified) # our own props
1
&gt;&gt;&gt; msg = wc.revert() # roll back our changes
&gt;&gt;&gt; len(wc.status().prop_modified)
0</pre>
</div>
</div>
<div class="section" id="svn-authentication">
<h4>3.2.1.5. SVN authentication<a class="headerlink" href="#svn-authentication" title="Permalink to this headline"></a></h4>
<p>Some uncommon functionality can also be provided as extensions, such as SVN
authentication:</p>
<div class="highlight-python"><pre>.. &gt;&gt;&gt; if not py.test.config.option.urlcheck: raise ValueError('skipchunk')
&gt;&gt;&gt; auth = py.path.SvnAuth('anonymous', 'user', cache_auth=False,
... interactive=False)
&gt;&gt;&gt; wc.auth = auth
&gt;&gt;&gt; wc.update() # this should work
&gt;&gt;&gt; path = wc.ensure('thisshouldnotexist.txt')
&gt;&gt;&gt; try:
... path.commit('testing')
... except py.process.cmdexec.Error, e:
... pass
&gt;&gt;&gt; 'authorization failed' in str(e)
True</pre>
</div>
</div>
</div>
</div>
<div class="section" id="known-problems-limitations">
<h2>3.3. Known problems / limitations<a class="headerlink" href="#known-problems-limitations" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>The SVN path objects require the &#8220;svn&#8221; command line,
there is currently no support for python bindings.
Parsing the svn output can lead to problems, particularly
regarding if you have a non-english &#8220;locales&#8221; setting.</li>
<li>While the path objects basically work on windows,
there is no attention yet on making unicode paths
work or deal with the famous &#8220;8.3&#8221; filename issues.</li>
</ul>
</div>
<div class="section" id="future-plans">
<h2>3.4. Future plans<a class="headerlink" href="#future-plans" title="Permalink to this headline"></a></h2>
<p>The Subversion path implementations are based
on the <cite>svn</cite> command line, not on the bindings.
It makes sense now to directly use the bindings.</p>
<p>Moreover, it would be good, also considering
<a class="reference external" href="execnet.html">py.execnet</a> distribution of programs, to
be able to manipulate Windows Paths on Linux
and vice versa. So we&#8217;d like to consider
refactoring the path implementations
to provide this choice (and getting rid
of platform-dependencies as much as possible).</p>
<p>There is some experimental small approach
(<tt class="docutils literal"><span class="pre">py/path/gateway/</span></tt>) aiming at having
a convenient Remote Path implementation
and some considerations about future
works in the according <tt class="docutils literal"><span class="pre">py/path/gateway/TODO.txt</span></tt></p>
<p>There are various hacks out there to have
Memory-Filesystems and even path objects
being directly mountable under Linux (via <cite>fuse</cite>).
However, the Path object implementations
do not internally have a clean abstraction
of going to the filesystem - so with some
refactoring it should become easier to
have very custom Path objects, still offering
the quite full interface without requiring
to know about all details of the full path
implementation.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="">3. py.path</a><ul>
<li><a class="reference external" href="#path-implementations-provided-by-py-path">3.1. Path implementations provided by <tt class="docutils literal"><span class="pre">py.path</span></tt></a><ul>
<li><a class="reference external" href="#py-path-local">3.1.1. <tt class="docutils literal"><span class="pre">py.path.local</span></tt></a></li>
<li><a class="reference external" href="#py-path-svnurl-and-py-path-svnwc">3.1.2. <tt class="docutils literal"><span class="pre">py.path.svnurl</span></tt> and <tt class="docutils literal"><span class="pre">py.path.svnwc</span></tt></a></li>
</ul>
</li>
<li><a class="reference external" href="#common-vs-specific-api">3.2. Common vs. specific API</a><ul>
<li><a class="reference external" href="#examples">3.2.1. Examples</a><ul>
<li><a class="reference external" href="#searching-txt-files">3.2.1.1. Searching <cite>.txt</cite> files</a></li>
<li><a class="reference external" href="#working-with-paths">3.2.1.2. Working with Paths</a></li>
<li><a class="reference external" href="#checking-path-types">3.2.1.3. Checking path types</a></li>
<li><a class="reference external" href="#setting-svn-properties">3.2.1.4. Setting svn-properties</a></li>
<li><a class="reference external" href="#svn-authentication">3.2.1.5. SVN authentication</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference external" href="#known-problems-limitations">3.3. Known problems / limitations</a></li>
<li><a class="reference external" href="#future-plans">3.4. Future plans</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="execnet.html"
title="previous chapter">2. py.execnet</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="code.html"
title="next chapter">4. py.code</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/path.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="code.html" title="4. py.code"
>next</a> |</li>
<li class="right" >
<a href="execnet.html" title="2. py.execnet"
>previous</a> |</li>
<li><a href="index.html">py lib v1.0.0b1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2009, Holger Krekel.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.7.
</div>
</body>
</html>