from sys import *
from os import *
def ReadConfig(file):
if path.exists(file):
lines=open(file).readlines()
conf_dict={}
for line in lines:
key=line.split('=')[0].strip()
value=line.split('=')[1].strip().replace('\n','')
if not key in conf_dict.keys():
conf_dict[key]=value
else:
if not type(value)==type(list()):
conf_dict[key]=[conf_dict[key]]
conf_dict[key].append(value)
return conf_dict
else: exit('Config file not found')
lines=open(file).readlines()
TypeError: function takes at least 2 arguments (1 given)
В чем собственно дело?