I'm writing a program in wxpython, and to make GUI parts that are built in different modules I made a module called runtime, where all the GUI parts get stored on runtime.This is how it looks:  mainFrame = anotherGUIPart = InputDialog = SomethingElse = NoneFor example, when I need to make a ListControl to update itself, I use#anotherGUIPart.pyclass AnotherGUIPart(wx.Panel):    def __init__(self, *args, **kwargs):        wx.Panel.__init__(self, *args, **kwargs)        self.listCtrl = wx.ListCtrl(self,                 style=wx.LC_REPORT | wx.LC_SINGLE_SEL)        ...    def UpdateList(self):        self.listCtrl.DeleteAllItems()        ...#Somewhere where I need to update the listimport runtimeruntime.anotherGUIPart.UpdateList()Is this a good practice?If not, what are alternatives?
Is it a good idea to store GUI elements in a module on runtime?
python
This is fine, as long as you're not bleeding too much across the module boundaries. Ideally you would have a structure somewhat akin to MVC, where you have all of your UI logic in one module, all your business logic in another, and a controller module which links the two together. However, if you find that this improves your ability to understand the code then that's just fine. If you post a link to more of your code it'll be easier to review the design as this is quite macro-scale.