I'm making a scraper/web crawler using Kivy when I run the code it works but I'm not sure if what I'm doing is Pythonic because all the language I can find is about using the Kivy library. I'm unsure about putting the functions to bind the widgets to inside the build method. Is there a better way?class MainApp(App):    def build(self):        root = RootWidget()        c = CustomLayout()        root.add_widget(c)        search_term = TextInput(            text='',            size_hint=(.5, .05),            pos=(250, 15))        c.add_widget(search_term)        def on_enter(self):            scrape = Scrape(search_term.text, ['user_agent','chrome'])            scrape.get_goog_links()        get_links = Button(            text='Get links',            size_hint=(.5, .10),            pos=(20, 20))        root.add_widget(get_links)        get_links.bind(on_press=on_enter)        return root
Scraping links from the first page of Google using Kivy
python;web scraping;kivy