Possible Duplicate:
Checking a Dictionary using a dot notation string
There is a multi-levels dict like this:
some_infomations = {
"root":{
"sub":{
"more_deep":{
"not_enough": "Some value",
"another": "bla..bla"
}
},
"more":{
"more_deep":{
"not_enough": "Some value",
"another": "bla..bla"
}
}
}
}
I have a crumbs string such as root.sub.more_deep.another
, is there a simple and good way to do the work just like eval("some_infomations[root.sub.more_deep.another] = some_value")
?