<p class="MsoNormal">Hi,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">The docs for compileall give an example of compiling pyc files in a directory while excluding '.svn' subdirectories:</p><div class="highlight-python" style="font-family:sans-serif;background-color:rgb(255,255,255)">
<div class="highlight" style="background-color:rgb(238,255,204);background-image:initial"><pre style="overflow-x:auto;overflow-y:hidden;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;color:rgb(51,51,51);line-height:15px;border-top-width:1px;border-bottom-width:1px;border-top-style:solid;border-bottom-style:solid;border-top-color:rgb(170,204,153);border-bottom-color:rgb(170,204,153);border-left-style:none;border-left-width:initial;border-left-color:initial;border-right-style:none;border-right-width:initial;border-right-color:initial">
<span class="n">compileall</span><span class="o" style="color:rgb(102,102,102)">.</span><span class="n">compile_dir</span><span class="p">(</span><span class="s" style="color:rgb(64,112,160)">'Lib/'</span><span class="p">,</span> <span class="n">rx</span><span class="o" style="color:rgb(102,102,102)">=</span><span class="n">re</span><span class="o" style="color:rgb(102,102,102)">.</span><span class="n">compile</span><span class="p">(</span><span class="s" style="color:rgb(64,112,160)">'/[.]svn'</span><span class="p">),</span> <span class="n">force</span><span class="o" style="color:rgb(102,102,102)">=</span><span class="bp" style="color:rgb(0,112,32)">True</span><span class="p">)</span><font size="4">
</font></pre></div></div><p class="MsoNormal">Neither this part nor documentation for the 'rx' attribute make clear that the paths searched with the regular expression will have OS specific separators. This example doesn't work on Windows, for example. I think the example should be explicit that the paths will contain the native separators (or it should use pathsep instead of '/', or maybe '[/\\]', to make it clearer in the example).</p>
<p class="MsoNormal"><br></p><p class="MsoNormal">Thanks,</p><p class="MsoNormal">Paul</p>