]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix example ignoring ".svn" directories in compileall.
authorGeorg Brandl <georg@python.org>
Sun, 14 Apr 2013 10:02:43 +0000 (12:02 +0200)
committerGeorg Brandl <georg@python.org>
Sun, 14 Apr 2013 10:02:43 +0000 (12:02 +0200)
Doc/library/compileall.rst

index cf0d5f85a0a383bb616c939f689b788297ee01ec..0e79a5ab5d6714bbfa660df7e133e8815b8d00bd 100644 (file)
@@ -127,7 +127,7 @@ subdirectory and all its subdirectories::
 
    # Perform same compilation, excluding files in .svn directories.
    import re
-   compileall.compile_dir('Lib/', rx=re.compile('/[.]svn'), force=True)
+   compileall.compile_dir('Lib/', rx=re.compile(r'[/\\][.]svn'), force=True)
 
 
 .. seealso::