<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-05-05 13:02 GMT+02:00 Oleg Broytman <span dir="ltr"><<a href="mailto:phd@phdru.name" target="_blank">phd@phdru.name</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!<br>
<span class=""><br>
On Fri, May 05, 2017 at 09:58:15AM +0200, George Fischhof <<a href="mailto:george@fischhof.hu">george@fischhof.hu</a>> wrote:<br>
> Hi Folks,<br>
><br>
> I have a task to synchronize folders but some files should be remained<br>
> untouched.<br>
<br>
</span>   Synchronize folders using rmtree()? I don't get it.<br>
<span class=""><br>
> I think this is a very common task.<br>
<br>
</span>   I think it is not that common.<br>
<span class=""><br>
> I found that shutil.copytree() has ignore_patterns() but rmtree() has not.<br>
><br>
> So here comes my idea: add ignore_patterns() to rmtree() it is a good<br>
<br>
</span>   rmtree() is like ``rm -r``, not like ``find . -name *.pyc -delete``.<br>
<span class=""><br>
> feature and makes the functions symmetric.<br>
<br>
</span>   Why impose artificial symmetry?<br>
<br>
> BR,<br>
> George<br>
<span class="HOEnZb"><font color="#888888"><br>
Oleg.<br>
--<br>
     Oleg Broytman            <a href="http://phdru.name/" rel="noreferrer" target="_blank">http://phdru.name/</a>            <a href="mailto:phd@phdru.name">phd@phdru.name</a><br>
           Programmers don't die, they just GOSUB without RETURN.<br>
</font></span><div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/<wbr>codeofconduct/</a><br>
</div></div></blockquote></div><br><br><br></div><div class="gmail_extra">Actually it would be good if copytree() would be able to overwrite files and directories.<br><br></div><div class="gmail_extra">George<br></div></div>