Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PIL import Image | |
| import os | |
| from pathlib import Path | |
| def setFolderImage(folder, recurse=True): | |
| print(folder) | |
| contents = os.listdir(folder) | |
| files = [f for f in contents if os.path.isfile(Path(folder).joinpath(f))] | |
| dirs = [d for d in contents if os.path.isdir(Path(folder).joinpath(d))] | |
| images = [i for i in files if Path(i).suffix.lower() in ['.jpg', '.png']] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*<?php | |