Best strategy to serialize wx.TreeCtrl contents between sessions

J.A. de Vries wrote:

Hi all,

I've recently begun to work on an application that uses a TreeCtrl to
navigate between all items. Using the TreeCtrl itself is no problem, but
I was wondering what strategies more experienced python programmers
(than me than is) use to store the state [1] of the tree between sessions.

Do you use XML, or some internal format I haven't found yet? And what
method do you use to get the state data from the tree to a file and back
again?

Thanks for your insights!

[1] With state I mean not only the active node, but also the order
and the labels of all the nodes. I don't mean the contents of the
objects linked to the nodes though.

Take a look at the wx.lib.mixins.treectrl module.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!