def builder_build(self, *args, **kwargs):
        widget_list_dict = kwargs.get('widget_list_dict', {})
        def parse_widgets(file):
            ids = re.compile("(?:id=\"([a-zA-Z0-9_]*?)\")+")
            classes = re.compile("(?:class=\"([a-zA-Z0-9_]*?)\")+")
            components = {}
            current = ''
            with open(file) as lines:
                for line in lines.readlines():
                    for id in ids.findall(line):
                        #print 'r:',id
                        if id:
                            for klass in classes.findall(line):
                                #print 'l:',left
                                if klass in self.Gtk_Widget_List:
                                    components[id] = []
                                    current = id

                                if not klass in self.Gtk_Widget_List  and current:
                                    try:
                                        components[current].append( id )
                                    except __HOLE__:
                                        print 'cb: ',current, 'r:',id, 'l:', klass
            return components

        file = kwargs.get('builder_file', './data/ui/builder.ui')

        if isinstance(file, list):
            for f in file:
                widget_list_dict.update(parse_widgets(f))
                self.add_file(f)
                self.connect_widgets(self)
            #print widget_list_dict
        elif isinstance(file, str):
            widget_list_dict = parse_widgets(file)
            self.add_file(file)
            self.connect_widgets(self)
        if widget_list_dict:
            self.get_widgets(widget_list_dict)
            return True
        else:
            return False
dataset/ETHPy150Open lionheart/TimeTracker-Linux/libs/UI.py/uiBuilder.builder_build