def exiftool_metadata(path):
    metadata = {}
    exifToolPath = 'exifTool.exe'
    ' use Exif tool to get the metadata '
    process = subprocess.Popen([exifToolPath, path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
    ' get the tags in dict '
    for tag in process.stdout:
        tag = tag.strip()
        key = tag[:tag.find(':')].strip()
        value = tag[(tag.find(':') + 1):].strip()
        metadata[key] = value
    return metadata
def exiftool_metadata(path):
    metadata = {}
    exifToolPath = 'exifTool.exe'
    ' use Exif tool to get the metadata '
    process = subprocess.Popen([exifToolPath, path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
    ' get the tags in dict '
    for tag in process.stdout:
        tag = tag.strip()
        key = tag[:tag.find(':')].strip()
        value = tag[(tag.find(':') + 1):].strip()
        metadata[key] = value
    return metadata