A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-April/078717.html below:

[Python-Dev] A smarter shutil.copytree ?

[Python-Dev] A smarter shutil.copytree ?Tarek Ziadé ziade.tarek at gmail.com
Thu Apr 17 19:02:57 CEST 2008
>  --------------------- copying a source to a target, but the pyc/pyo file
>  def filtering(source, target):
>     return os.path.splitext(filename) not in ('.pyc', '.pyo')
>
>  shutil.copytree(source, target, filter_=filtering)
>  ---------------------

oups, made a mistake in my example:

def filtering(source_path, target_path):
    return os.path.splitext(source_path) not in ('.pyc', '.pyo')

shutil.copytree(source, target, filter_=filtering)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4