[docs] compileall module: exclusion example is path separator-specific

Paul A. Giannaros paul at giannaros.org
Thu Feb 16 13:12:49 CET 2012


Hi,



The docs for compileall give an example of compiling pyc files in a
directory while excluding '.svn' subdirectories:

compileall.compile_dir('Lib/', rx=re.compile('/[.]svn'), force=True)

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).


Thanks,

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20120216/e7db9bf8/attachment.html>


More information about the docs mailing list