wxPython frames stored in a database?

in the 80’s I worked with an international company using Fortran. At the time they had an editor to set up a frame with fields. Once ready with editing the frame characteristics were stored in a datafile. In your application you would attach to the datafile and call the screen by its name. Upon unloading entered values were stored in arrays, that was it
Is something identical, in theory, possible with the wx interface: edit a frame like you would do in LibreOffice base, store in a file and let the frame appear in two lines of coding, attributes can be accessed by their names, events through class inheritance?
Tutorials start with ‘application is very simple’ and end with a hundred lines of coding to set up the menu, labels, fields and so on.

You’re describing some aspects of a GUI builder. Try wxGlade.

it wasn’t in the 80’s but this century when I touched the SE80 (if I remember right) of SAP on the application side: it’s not cheap but does what you are talking about and, I suppose, the reason for the mounts of dubious apps at quite a few sites which, of course, also offer opportunities :wink:

OK, thanks voor the tip. My impression from sourceforge is that it is a kind of editor to generate the hundred lines of code, with the advantage that it can do that for a number of programming languages. I give it a go if a project comes up.

Another option is to use XRC. This is an XML format which can define the widgets and layouts for a UI. This is the “datafile” analog you mention in your first post. Your code can dynamically load XRC from a file, or from memory where it may have been loaded from some other source, like a database or perhaps a network stream. Take a look at the XRC samples in the demo.

XRC can be written by hand, or you can use UI editor tools like wxGlade to write XRC files rather than Python source.

1 Like