I am writing an application in wxPython. It uses an XML file which populates a tree. When the application initialises it passes the XML file through xml.sax and stores all the data in a series of lists and dictionaries.

One crucial element of the application is that a user can edit some of the data that is held in the XML. I have all of this working fine - when the Save button pushes the XML file is correctly changing to hold the new data. However, as the data is already passed, other elements of the application which use this data don't update.

The long solution would be to destroy everything on the frame, reimport the script which manages the XML SAX parser and then set about recreating everything. I'm guessing that there is some way of reinitializing wx.App, which would allow me to recreate the stage and force the XML to update.

Currently, all I can work out is how to destroy and recreate the frame, and seperately reload the XML - but not to get the whole applicaion to reinitialise.

Finally, if there was a function or script that could get the entire application to close and reload (potentially freezing the screen as it goes) that would work just as well (this is a lean mean app).


Vital Stats:
Python 2.5
wxWidgets 2.8.1
Windows Server 2003

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.