escritura
index
/home/manager/prog-python/test_fundamentos/fundamentos/escritura.py

                       Paquete fundamentos
  Conjunto de módulos para hacer entrada/salida sencilla en Python
 
                       Copyright (C) 2019
                 Universidad de Cantabria, SPAIN
                         Versión 1.1
                         Marzo 2019
 
 @author: Michael Gonzalez   <mgh@unican.es>
 
 Licencia: GPL
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public
 License as published by the Free Software Foundation; either
 version 3 of the License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 General Public License for more details.
 
-----------------------------------------------------------------------
escritura.py: Módulo con una clase que permite escribir datos
              en una ventana
-----------------------------------------------------------------------
 
--------------------
-- Ejemplo de uso --
--------------------
 
from fundamentos.escritura import Escritura
 
def main():
 
    # Paso 1: crear el objeto de la clase Escritura
    escr = Escritura("Datos del experimento")
 
    # Paso 2: crear las entradas para mostrar datos
    escr.inserta_valor("Número de secuencia", 1)
    escr.inserta_valor("Voltaje (V)", 0.0)
    escr.inserta_valor("Nombre del técnico", "Pedro")
 
    # Paso 3: esperar a que el usuario se dé por enterado
    escr.espera()
 
    # Paso 4: destruir la ventana
    escr.destruye()

 
Modules
       
time

 
Classes
       
builtins.object
Escritura

 
class Escritura(builtins.object)
    Escritura(titulo: str)
 
Esta clase representa una ventana con entradas para escribir datos
 
  Methods defined here:
__init__(self, titulo: str)
Crea la ventana
 
Args:
    titulo: El título de la ventana
destruye(self)
Destruir la ventana
espera(self) -> bool
Pinta la ventana y espera hasta que se pulsa OK
 
Returns:
    True si se ha matado la ventana, False si se ha pulsado OK
inserta_valor(self, etiqueta: str, valor: str)
Crea una entrada en la que se puede teclear texto
 
Args:
    etiqueta: texto colocado al lado de la entrada para identificarla
    valor: el valor escrito

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Data
        E = 'e'
List = typing.List
SUNKEN = 'sunken'