3 Commits

Author SHA1 Message Date
9dbc9fc89d Ouvre le dictionnaire avec un 'with statement' 2022-01-24 16:52:59 +01:00
57c87fe986 import os : pas besoin 2022-01-24 16:48:38 +01:00
971f078ee2 Python3 2022-01-24 16:47:29 +01:00

View File

@@ -1,7 +1,6 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import json
import argparse
@@ -64,10 +63,9 @@ args = parser.parse_args()
# Dictionary
if args.dictionary:
fp = args.dictionary
try :
f = open(fp)
liste = json.load(f)
with open(args.dictionary, "r") as dico:
liste = json.load(dico)
except:
print("Impossible d'ouvrir le fichier" + fp)