Пример #1
0
from weather import Tiempo
from VistaProvincia import ProvinciasView
from Controlador import Controlador
from Mprovincias import ManejaProvincia
from ObjectEncoder import ObjectEncoder
if __name__ == "__main__":
    encoder = ObjectEncoder()
    try: 
        aux=encoder.Leer("datos.json")
        aux=encoder.Decoder(aux)

    except FileNotFoundError:
        aux=ManejaProvincia()

    vista=ProvinciasView()
    control=Controlador(vista, aux)
    vista.setControlador(control)
    control.start()
    encoder.Guardar(control.salir(), "datos.json") 
    
Пример #2
0
from VistaPacientes import PacientesView
from ObjectEncoder import ObjectEncoder
from Mpacientes import ManejaPaciente
from Controlador import Controlador
if __name__ == "__main__":
    encoder = ObjectEncoder()
    try:
        aux = encoder.Leer("Pacientes.json")
        aux = encoder.Decoder(aux)
    except FileNotFoundError:
        aux = ManejaPaciente()
    vista = PacientesView()
    control = Controlador(vista, aux)
    vista.setControlador(control)
    control.start()
    encoder.Guardar(control.salir(), "Pacientes.json")