def on_btn_filechooser_rules_file_set(self, widget, data=None): self.rules_main_team = widget.get_uri().replace("file://", "") formacionAsociada = filenames.devolverFormacionAsociada(widget.get_uri()) self.label_description.set_label(leer_comentario(widget.get_filename())) if formacionAsociada != None: self.btn_formation.set_uri(formacionAsociada) self.formation_main_team = self.btn_formation.get_uri().replace("file://", "")
def on_file_chooser_es_ia_file_set(self, widget, data=None): self.rules_computer = widget.get_uri().replace('file://', '') formacionAsociada = filenames.devolverFormacionAsociada(widget.get_uri()) self.label_description.set_label(leer_comentario(widget.get_filename())) if formacionAsociada != None: self.file_chooser_team_ia.set_uri(formacionAsociada) self.formation_computer = formacionAsociada.replace('file://','')
def on_file_chooser_es_b_file_set(self, widget, data=None): self.es_team_b = widget.get_uri() formacionAsociada = filenames.devolverFormacionAsociada(widget.get_uri()) self.label_desc_B.set_label(leer_comentario(widget.get_filename())) if formacionAsociada != None: self.file_chooser_team_b.set_uri(formacionAsociada) self.team_team_b = formacionAsociada
def on_file_chooser_es_b_file_set(self, widget, data=None): self.es_team_b = widget.get_uri() formacionAsociada = filenames.devolverFormacionAsociada( widget.get_uri()) self.label_desc_B.set_label(leer_comentario(widget.get_filename())) if formacionAsociada != None: self.file_chooser_team_b.set_uri(formacionAsociada) self.team_team_b = formacionAsociada
def on_file_chooser_es_ia_file_set(self, widget, data=None): self.rules_computer = widget.get_uri().replace('file://', '') formacionAsociada = filenames.devolverFormacionAsociada( widget.get_uri()) self.label_description.set_label(leer_comentario( widget.get_filename())) if formacionAsociada != None: self.file_chooser_team_ia.set_uri(formacionAsociada) self.formation_computer = formacionAsociada.replace('file://', '')
def apply_file_chooser_rules(self): self.file_chooser_rules_handler() self.file_chooser_rules.hide() if self.check_default_formations.get_active(): self.formation_selected_file = filenames.devolverFormacionAsociada( self.file_chooser_rules.get_filename())[7:] self.contest_dialog.show() self.insert_element_list() else: self.file_chooser_formation.show()
def apply_file_chooser_rules(self): self.file_chooser_rules_handler() self.file_chooser_rules.hide() if self.check_default_formations.get_active(): self.formation_selected_file = filenames.devolverFormacionAsociada(self.file_chooser_rules.get_filename())[ 7: ] self.contest_dialog.show() self.insert_element_list() else: self.file_chooser_formation.show()
def get_installed_teams(): """ Return a list of the installed teams. We consider a installed team some of the way 'data/teams/formations/equipoXX.form', 'data/teams/rules/reglasYYYY.clp' where XX == YYYY """ base_path = configure.load_configuration()['se_path'] rules_path = os.path.join(base_path, 'rules') ficheros_reglas = browse_dir_rules(rules_path) conjuntoTotal = [] for this_regla in ficheros_reglas: this_formacion = filenames.devolverFormacionAsociada(this_regla, True) if this_formacion != "": conjuntoTotal.append((this_regla, this_formacion)) else: logging.error("ATENCIÓN: no se encontró el fichero de formación para el fichero de reglas <%s>", this_regla) logging.info("* %i equipos instalados en el sistema", len(conjuntoTotal)) return conjuntoTotal
def get_installed_teams(): """ Return a list of the installed teams. We consider a installed team some of the way 'data/teams/formations/equipoXX.form', 'data/teams/rules/reglasYYYY.clp' where XX == YYYY """ base_path = configure.load_configuration()['se_path'] rules_path = os.path.join(base_path, 'rules') ficheros_reglas = browse_dir_rules(rules_path) conjuntoTotal = [] for this_regla in ficheros_reglas: this_formacion = filenames.devolverFormacionAsociada(this_regla, True) if this_formacion != "": conjuntoTotal.append((this_regla, this_formacion)) else: logging.error( "ATENCIÓN: no se encontró el fichero de formación para el fichero de reglas <%s>", this_regla) logging.info("* %i equipos instalados en el sistema", len(conjuntoTotal)) return conjuntoTotal