Skip to content

Instantly share code, notes, and snippets.

@tldrafael
Created January 23, 2020 16:55
Show Gist options
  • Save tldrafael/8d3563452fd1b07c02236ad132d730b8 to your computer and use it in GitHub Desktop.
Save tldrafael/8d3563452fd1b07c02236ad132d730b8 to your computer and use it in GitHub Desktop.
from glob import iglob
def return_impaths(dpath):
impaths = [list(iglob('{}/*.{}'.format(dpath, e))) for e in ['png', 'jpg', 'jpeg']]
impaths = sum(impaths, [])
return impaths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment