@@ -0,0 +1,1414 @@
+%0Aimport inspect,os%0Afrom kivy.app import App%0Afrom kivy.uix.gridlayout import GridLayout%0Afrom kivy.uix.label import Label%0Afrom kivy.uix.button import Button%0Afrom kivy.uix.textinput import TextInput%0Afrom kivy.core.window import Window%0A%0AWindow.size=(400,130)%0A%0Aclass Formulario(GridLayout):%0A%09lista=%5B%5D%0A%0A%09def __init__(self, **kwargs):%0A%09%09super(Formulario, self).__init__(**kwargs)%0A%09%09self.cols=2%0A%09%09%0A%09%09self.add_widget(Label(text='Nombre'))%0A%09%09self.username = TextInput(multiline=False)%0A%09%09self.add_widget(self.username)%0A%09%09btn_guardar = Button(text=('Guardar'))%0A%09%09self.add_widget(btn_guardar)%0A%09%09btn_guardar.bind(on_press=self.metodo_guardar)%0A%09%09btn_exportar = Button(text=('Exportar'))%0A%09%09self.add_widget(btn_exportar)%0A%09%09btn_exportar.bind(on_press=self.metodo_exportar)%0A%09%09%0A%0A%09def metodo_guardar(self,evento):%0A%09%09self.lista.append(self.username.text)%0A%09%09print(self.lista)%0A%09%09%0A%09def metodo_exportar(self,evento):%0A%09%09print(self.lista)%0A%09%09f_path=os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))%0A%09%09try:%0A%09%09%09zz = open(f_path+ %22/asistencia.txt%22,%22a+%22)%0A%09%09%09zz.write(%22%5CnNombres: %22+ str(self.lista) )%0A%0A%09%09except IOError:%0A%09%09%09print(%22%5CnNo se ha podido crear el fichero asistencia.txt%22)%0A%09%09else:%0A%09%09%09print(%22%5CnEl archivo asistencia.txt se ha creado correctamente.%22)%0A%09%09zz.close()%0A%0Aclass AsistenciaApp(App):%0A%09def build(self):%0A%09%09self.title=%22Lista de asistencia%22%0A%09%09return Formulario()%0A%0Aif __name__ == '__main__':%0A%09AsistenciaApp().run()%0A

Rename tarea7.py to tareas7.py