def buffer_file_cmp(printer, file_name): current_data_code("EJ.01.01") mesa = Ubicacion.one(codigo="EJ.01.01.01.01") boleta = Seleccion(mesa) boleta.elegir_lista(Lista.one()) img = boleta.a_imagen() img = img.output() img = img.transpose(Image.ROTATE_90) data = img.getdata() printer.load_buffer_compressed(data)
def get_tag(): mesa = Ubicacion.get(numero="1001") recuento = Recuento(mesa) seleccion = Seleccion(mesa) listas = Lista.all() lista = Lista.get(numero="207") for i in range(200): seleccion.elegir_lista(lista) recuento.sumar_seleccion(seleccion) lista = Lista.get(numero="38") for i in range(100): seleccion.elegir_lista(lista) recuento.sumar_seleccion(seleccion) lista = Lista.get(numero="603") for i in range(50): seleccion.elegir_lista(lista) recuento.sumar_seleccion(seleccion) for i in range(46): lista = choice(listas) seleccion.elegir_lista(lista) recuento.sumar_seleccion(seleccion) tag = seleccion.a_tag() return tag
def _precache_generacion_img(self): #Imagen dummy para importar lo relacionado a generar imagenes test_seleccion = Seleccion(self.sesion.mesa) test_seleccion.rellenar_de_blanco() test_seleccion.a_imagen(svg=True) del test_seleccion
def reiniciar_seleccion(self): """Resetea la seleccion. Elimina lo que el usuario eligiĆ³.""" self.parent.seleccion = Seleccion(self.sesion.mesa)
def _comenzar(self): # Inicializo la seleccion if self.estado != E_VOTANDO: self.set_estado(E_VOTANDO) self.seleccion = Seleccion(sesion.mesa, sesion.interna) self.controller.set_screen(PANTALLA_SELECCION_CANDIDATOS)