This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chin
Recipients chin
Date 2011-07-30.17:52:50
SpamBayes Score 2.430034e-07
Marked as misclassified No
Message-id <1312048372.59.0.959522450911.issue12661@psf.upfronthosting.co.za>
In-reply-to
Content
Hello,

This patch adds new function to shutil.
I think it's quite generic, and it fits shutil purpose.

Sample usage:
shutil.cleartree(path='/home/chin/Dev/python-hg-dev', ignore=shutil.ignore_pattterns('*.py'))

removes all files from path, except *.py files. 

and

shutil.cleartree(path='/home/chin/Dev/python-hg-dev', ignore=shutil.ignore_pattterns('*.pyc'), invert=True)

is equivalent to `find /home/chin/Dev/python-hg-dev -name "*.pyc" -delete`
History
Date User Action Args
2011-07-30 17:52:52chinsetrecipients: + chin
2011-07-30 17:52:52chinsetmessageid: <1312048372.59.0.959522450911.issue12661@psf.upfronthosting.co.za>
2011-07-30 17:52:51chinlinkissue12661 messages
2011-07-30 17:52:51chincreate