I'm doing a crud maintenance using python / kivy. There are four main files, one for P table, one for A, and one for C. The fourth main file is the main screen which will have three buttons for you to choose which table to edit and, when clicked on this button, runs the main of the selected table. But I do not remember how I execute a file when the button is clicked. Here is the main code in python:
import kivy
from main_Aluno.py import Manutencao_A
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
class TelaPrincipal(App):
pass
class Button(BoxLayout):
def clickA(self)
return main_Aluno.py
def clickP(self):
return main_Professor.py
def clickC(self):
return main_Curso.py
botao = TelaPrincipal()
botao.run()
Note: Manupply_A is the class that contains the main A
I do not know if it's relevant but it follows the code in kivy too:
<Button@BoxLayout>:
orientation: vertical
Label:
text: "Escolha a tela a ser editada"
Button:
text: "Alunos"
on_press: root.clickA()
Button:
text: "Professores"
on_press: root.clickP()
Button:
text: "Cursos"
on_press: root.clickC()