def copyonly(dirpath, contents):
    return set(contents) - set(shutil.ignore_patterns('*.py', '*.el')(
        dirpath, contents))
shutil.copytree(src='.', dst='temp/', ignore=copyonly)
print(glob.glob('temp/*'))
python copytree with negated ignore pattern