import fnmatch


def filefilter(filename):
  """Filter list of files for .jpg and return those"""
  return fnmatch.fnmatch(filename, '*.JPG') or fnmatch.fnmatch(filename, '*.jpg') or fnmatch.fnmatch(filename, '*.jpeg')