示例#1
0
 def changeOptions(self):
     self.pause()
     w = WindowKibitzers.WKibitzerLive(self, self.cpu.configuration, self.cpu.numkibitzer)
     if w.exec_():
         xprioridad = w.result_xprioridad
         if xprioridad is not None:
             pid = self.engine.pid()
             if Code.is_windows:
                 hp, ht, pid, dt = struct.unpack("PPII", pid.asstring(16))
             p = psutil.Process(pid)
             p.nice(xprioridad)
         if w.result_opciones:
             for opcion, valor in w.result_opciones:
                 if valor is None:
                     orden = "setoption name %s" % opcion
                 else:
                     if type(valor) == bool:
                         valor = str(valor).lower()
                     orden = "setoption name %s value %s" % (opcion, valor)
                 self.escribe(orden)
     self.play()
示例#2
0
 def edit(self):
     w = WindowKibitzers.WKibitzers(self.main_window, self)
     w.exec_()