From: Brian T. <Brian.Toby@ANL.gov> - 2012-12-30 23:14:02
|
Happy new year! I would like to mention a few issues with wxGlade for python, as well as ask some questions. Also, I'd like to invite use/feedback on a small package I am writing that I see as a wxGlade add-on. I would categorize this as a bug: the generated python code does not import wx.calendar or wx.grid when the wx.calendar.CalendarCtrl and wx.grid.Grid widgets are used, so the generated code requires a manual edit before it can be used. This is more a question of style: I am still trying to master wx, but my understanding is that if more than one widget will be placed in a frame, one should use a panel. Is there any reason not to automatically generate a frame, panel and sizer rather than just a frame and sizer when one creates a new frame? (Without the panel, tabs and perhaps some other features don't work). I think this would be a relatively minor change, which I can try to implement in wxGlade. If not, does it make sense to have a third frame option for a frame+panel? My interest in wxGlade comes from a desire to support a number of scientists who want to write relatively simple GUI programs for data collection and processing. Learning wxPython is probably going to be a significant challenge for them. Use of wxGlade lowers the threshold, but still requires learning plenty of wx to "wire up" the GUI. My thought was to create a package that takes a wxGlade output script as input and creates a wrapper that provides access to most of the commonly needed wxPython functionality, but wrapped in regular python objects, which should lower the learning curve. This is called wxGlue. The codebase is here: https://subversion.xray.aps.anl.gov/spec1ID/specpy/wxGlue Web documentation is here: https://subversion.xray.aps.anl.gov/spec1ID/specpy/wxGlue/docs/build/html/index.html or as pdf: https://subversion.xray.aps.anl.gov/spec1ID/specpy/wxGlue/docs/build/latex/wxGlue.pdf (note that this server might disappear from the web for a few hours sometime soon as the IT folks update it.) I plan to add support for more wxGlade features into this (menus and toolbars next), but it can be used now, at least for some use cases. One challenge for me is learning to master more ways that wxGlade is used so I can see more of the wxGlue limitations. Perhaps I can work on more tutorials. I am interested in getting comments and suggestions (perhaps less so in public humiliation if there is something really dumb). One limitation here is that because references to StaticText widgets are not saved (unless one manually adds self.label_1 = label_1 into the wxGlade generated code). I'd love to come up with a simpler work-around. Brian |