Skip to content

Instantly share code, notes, and snippets.



Created Jun 22, 2019
What would you like to do?
Moi aussi
# -*- coding: utf-8 -*-
# pour executer ce script
# 1. Avoir python installé (déjà présent sur Mac ou Linux)
# 2. Ouvrir un Terminal (logiciel Terminal sur mac)
# 3. Taper dans le terminal: python <ce script> <le répértoire> > <fichier de sortie>
# E.g. python /Users/toto/Documents > output.txt
import glob
import hashlib
import sys
if len(sys.argv) < 2:
sys.stderr.write("Fournir le répértoire comme premier argument: e.g. python /Users/toto/Documents\n")
filenames = glob.glob(sys.argv[1] + "/*.dpx")
for filename in filenames:
with open(filename, 'rb') as inputfile:
data =
print(filename, hashlib.md5(data).hexdigest())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment