modif import in json class

This commit is contained in:
vincent 2018-08-26 19:16:27 +02:00
parent 62664cfca0
commit f1dbacc033

View File

@ -170,7 +170,6 @@ class Interface:
class JSONfile: class JSONfile:
def __init__(self,filename): def __init__(self,filename):
import os,json
self.datafilepath=os.path.dirname(os.path.realpath(__file__))+"/"+filename self.datafilepath=os.path.dirname(os.path.realpath(__file__))+"/"+filename
try: try:
with open(self.datafilepath, 'r', encoding='utf-8') as f: with open(self.datafilepath, 'r', encoding='utf-8') as f: