python
import toga
def button_handler(widget):
print("Button clicked!")
def build(app):
box = toga.Box()
button = toga.Button('Click me!', on_press=button_handler)
box.add(button)
return box
def main():
app = toga.App('MyApp', 'com.example.myapp', startup=build)
app.main_loop()
if __name__ == '__main__':
main()