[Python-checkins] r64761 - python/trunk/Doc/whatsnew/2.6.rst

Nick Coghlan ncoghlan at gmail.com
Mon Jul 7 15:10:18 CEST 2008


andrew.kuchling wrote:
> + The :mod:`shutil` module also provides an :func:`ignore_patterns`
> + function for use with this new parameter.
> + :func:`ignore_patterns` takes an arbitrary number of glob-style patterns
> + and will ignore any files and directories that match this pattern.
> + The following example copies a directory tree, but skip both SVN's internal
> + :file:`.svn` directories and Emacs backup 
> + files, which have names ending with '~'::
> +
> + shutil.copytree('Doc/library', '/tmp/library', 
> + ignore=shutil.ignore_patterns('*~'))

That code doesn't match the description - I think there was meant to be 
another argument to ignore_patterns.
Cheers,
Nick.
-- 
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
 http://www.boredomandlaziness.org


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /