I'm trying to use setattr to dynamically name and layout gui wx widgets, this is all fine and dandy until I've run up against something where I simply don't know what the object is, please see the amended **don't know** in the following code.
class MyFrame2(wx.Frame): def __init__(self, *args, **kwds): blah blah blah __do_layout(mayaVars) def __do_layout(self, mayaVars): main_boxSizer = wx.BoxSizer(wx.VERTICAL) for pDisplay in range(len(mayaVars.primary)): setattr=(**don't know**,"r_gridBagSizer_"+mayaVars.primary[pDisplay], wx.GridBagSizer(vgap=0, hgap=0)) Without all the dynamic gumpf, the statmement looks like this: r_gridBagSizer = wx.GridBagSizer(vgap=0, hgap=0)) All the other UI elements are created on 'self' but the sizers don't seem to 'belong' to anything - what should I use when this is the case? Many thanks, and apologies if I'm being dense Jules
-- http://mail.python.org/mailman/listinfo/python-list