def create_module( self, parent_id = 0 ): """ Adds a module to the interface as a sub-module of of the module of the given id. """ mod = Module() self.__opts['modules'].append(mod) mod.index = len(self.__opts['modules']) - 1 return self.__opts['modules'][parent_id].add_element(mod)