On Oct 21, 2014, at 4:13 AM, Brian Madden <[email protected]> wrote:

> I have a Pyhon app that stores its configuration in YAML files, and I'm
> interested in creating a GUI configuration creator / editor. I'm curious as
> to whether anyone can give me some pointers as to how I'd best do this with
> dabo?
> 
> I know there are XML file-based databases out there, and I could easily
> write an interface to my app that reads/writes to XML. (My config files are
> small in the grand scheme of things and easily held in a Python dictionary,
> so whether they persist on disk in YAML or XML format is fairly trivial.)
> But I believe that using an XML file-based DB would require that my
> dabo-based designer included the DB engine as well, and I wonder if that's
> the right approach?
> 
> Or can I use (or extend) dabo's database access methods to work against a
> Python dictionary in which case I'd be all set?

You have two separate issues: read/write of the YAML files, and editing those 
values in a Dabo GUI. For the former, I would recommend something like PyYAML 
(https://bitbucket.org/xi/pyyaml). It will convert YAML files to Python dicts, 
and vice-versa.

Editing nested dicts, however, can be a little trickier in a GUI, since you 
can't assume any particular structure. The only structure that comes to mind is 
a tree, so perhaps take a look at the dTreeView control and see if it can do 
what you need.


-- Ed Leafe







--- StripMime Report -- processed MIME parts ---
multipart/signed
  text/plain (text body -- kept)
  application/pgp-signature
---
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to