17 Apr
2008
17 Apr
'08
5:02 p.m.
--------------------- 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)