> --------------------- 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) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com