168
169
170
171
172
173
174
175
176
177
178
179
180
181
| def update(self, with_new_data):
for key,value in with_new_data.iteritems():
if type(value) == dict:
self[key].update(value)
else:
self[key] = value
# descends into sub-dicts instead of wiping them with subkeys
#-- actually fill global conf instance
conf = ConfigDict()
|
|
>
>
>
>
>
>
>
>
> | 168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190 | def update(self, with_new_data):
for key,value in with_new_data.iteritems():
if type(value) == dict:
self[key].update(value)
else:
self[key] = value
# descends into sub-dicts instead of wiping them with subkeys
# check for existing filename in directory list
def find_in_dirs(self, dirs, file):
for d in dirs:
if os.path.exists(d+"/"+file):
return d+"/"+file
#-- actually fill global conf instance
conf = ConfigDict()
|