v5 / utils.py
deepaksj's picture
Upload 7 files
bf9909e verified
Raw History Blame Contribute Delete
453 Bytes
def read_file_to_dic(file_path):
dic = {}
with open(file_path, 'r') as file:
for line in file:
# Skip comments and empty lines
if line.strip() and not line.startswith('//'):
key, value = line.strip().split('=', 1)
values = value.split(';')
dic[key] = values
return dic
def read_file(file_path):
with open(file_path, 'r') as file:
return file.read()