August 2018
Intermediate to advanced
366 pages
10h 14m
English
The steps for this recipe are as follows:
import shutil
def copydir(source, dest, ignore=None):
"""Copy source to dest and ignore any file matching ignore pattern."""
shutil.copytree(source, dest, ignore_dangling_symlinks=True,
ignore=shutil.ignore_patterns(*ignore) if ignore else None)
>>> import glob >>> print(glob.glob('_build/pdf/*')) ['_build/pdf/PySTLCookbook.pdf', '_build/pdf/PySTLCookbook.rtc', '_build/pdf/PySTLCookbook.stylelog'] ...