The recent advances in dumping settings allows us to get a quick snapshot
of the present settings:
d = c.config.settingsDictsources = list(set([
gs.path for gs in d.d.values() if gs.path is not None]))
# Yes, gs.path can be None.
# Compute the summary dict.
summary = {}
for path in sources:
inner_d = g.TypedDict(
name=g.shortFileName(path),
keyType=str,
valType=g.GeneralSetting)
summary [path] = inner_d
for key, val in d.items():
if val.path == path:
inner_d [key] = val
# Show the summary dict.
if 1:
# Brief: good for quck checks.
g.printObj([str(z) for z in summary.values()])
else:
# Complete. Good for deep debugging.
g.printObj(summary)
For my test file, this prints:
[
'<TypedDict name:leoSettings.leo keys:str values:GeneralSetting
len(keys): 433>',
'<TypedDict name:myLeoSettings.leo keys:str values:GeneralSetting
len(keys): 83>',
'<TypedDict name:ekr.leo keys:str values:GeneralSetting len(keys): 77>',
'<TypedDict name:EKRWindowsDark.leo keys:str values:GeneralSetting
len(keys): 114>'
]
This reveals the four sources of settings, and the number of settings
defined in each. Unless I am mistaken, it does *not* tell which settings
are overridden in each. Code in the settings branch suggests how to compute
that.
So this is the start of the "before" snapshot of any proposed overhaul of
the settings code. Something similar will likely suffice for the "after"
snapshot.
Edward
P.S. Use the latest code, in any branch. Doh!, g.TypedDict must have
values and items methods!
EKR
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/leo-editor/962e2f9a-62e7-4aca-b993-d02d6ef4b571%40googlegroups.com.