Reading object tree from file into Python
Posted
by jjkparker
on Stack Overflow
See other posts from Stack Overflow
or by jjkparker
Published on 2010-03-16T17:55:54Z
Indexed on
2010/03/16
18:01 UTC
Read the original article
Hit count: 234
python
I have a Python app that contains an object structure that the user can manipulate. What I want to do is allow the user to create a file declaring how the object structure should be created.
For example, I would like the user to be able to create the following file:
foo.bar.baz = true
x.y.z = 12
and for my app to then create that object tree automatically. What's the best way to do something like this?
© Stack Overflow or respective owner