1
votes

I created a UI builder with wxpython meaning I can dynamically create buttons and other widgets then the program will give me the code.

Here is the problem: How can I let the user save their work? Then load it later, and all the widgets will be back on the screen?

I tried in all the ways I can, even by using exec() but I always run into problems.

Can someone please post a example on how to do this? I can't find anything on the internet for this problem.

1
Are you using any of the existing tools for this type of thing like wxGlade? Some example code where you show what you've tried, or what didn't work, would garner much better responses. - g.d.d.c
Its on my old computer which is dead, but I used stuff such as exec('wx.Button(...)') and try and recreate all the widgets but nothing comes up. I am hoping someone can post an example that I can look at. - user1513192
Also, I am trying to make my own type of wxGlade - user1513192

1 Answers

0
votes

You may be able to use PersistenControls to help with this: http://xoomer.virgilio.it/infinity77/main/PersistentControls.html

It's actually included in wxPython now, I think. Probably since 2.8.11. Otherwise, you could use XRC to save it as XML. See the following links for more info: