from kivy.app import App
from kivy.uix.button import Button
class MyApp(App):
def build(self):
return Button(text = "Кнопка",
front_size = 30,
on_press = self.callback)
def callback(self, instance):
print("Кнопка нажата.")
if __name__ == "__main__":
MyApp().run()