[docs] compileall module: exclusion example is path separator-specific
Paul A. Giannaros
paul at giannaros.org
Thu Feb 16 13:12:49 CET 2012
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).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the docs