First I'd make name a String Property in Person
Then it were me I'd either:
1) Make Person a Subclass of button so it can change it's name and set the button
2) Subclass Button, add a reference to Person, have the button change the person name when it's text changes (I use this technique the most)
3) Add a function in MyApp that changes the name, something like this:
class Person(object):
name = StringProperty()
def __init__(self, name='Jack'):
else:
class MyApp(App):
def build(self):
self.p = Person("Jack")
self.button = Button(text=p.name, on_press=self.p.change_name)
self.p.bind(name=self.change_button_text)
return self.button
def change_button_text(self, n):
self.button.text = n
You can do this is a more sophisticated way with less code all within .kv language, but this is easy to follow as you get started.