Ok guys, it completely works with Python 2.7.15 (64 bits) and hactool 1.1.0 (thanks z10m)
now stuck at hactool :
λ hactool.exe --keyset=keys.txt
unable to open : Invalid argument
EDIT : we don't have to use hactool.exe, the masterkey 0 and 4 are already in the keys.txt...
Thanks for the tutorial.