title: How do I have a label display a string with a text input variable using python in Kivy without the kv. file?
body: <p>For context, I am creating a simple golf app. Unfortunately, I've run into an issue which really seems like it should be easy to solve but I can't figure it out. I'm trying to have the 3rd screen (RegisterWindow) say &quot;Hi (the username the user inputs in the screen before)&quot; by adding the variable I have set to whatever the user puts in, which is username. However, the code I have below gives me an attribute error. How do I fix this issue without using a kv. file?</p>
  <pre><code>from kivy.app import App
  from kivy.uix.label import Label
  from kivy.uix.button import Button
  from kivy.uix.textinput import TextInput
  from kivy.uix.floatlayout import FloatLayout
  from kivy.uix.screenmanager import ScreenManager, Screen, SlideTransition
  from kivy.core.window import Window
  
  
  class ScreenManagement(ScreenManager):
      def __init__(self, **kwargs):
          super(ScreenManagement, self).__init__(**kwargs)
  
  
  class LoadingWindow(Screen):
      def __init__(self, **kwargs):
          super(LoadingWindow, self).__init__(**kwargs)
          self.add_widget(Label(text='Welcome To The Putting Analyzer', font_size=100, size_hint=(.0, .0),
                                pos_hint={'x': .5, 'top': .6}))
  
          self.submit = Button(text=&quot;Continue&quot;, font_size=50, background_color=(160 / 255, 197 / 255, 196 / 255, 0),
                               size_hint=(.15, .15), pos_hint={'center_x': .5, 'y': .4})
          self.add_widget(self.submit)
          self.submit.bind(on_press=self.pressed)
          self.submit.bind(on_press=self.screen_transition)
  
      def pressed(self, instance):
          pass
  
      def screen_transition(self, *args):
          self.manager.current = 'login'
  
  
  class LoginWindow(Screen):
      def __init__(self, **kwargs):
          super(LoginWindow, self).__init__(**kwargs)
          self.add_widget(
              Label(text='First, enter a username: ', font_size=50, size_hint=(.0, .1), pos_hint={'x': .23, 'y': .7}))
          self.username = TextInput(multiline=False, size_hint=(.45, .1), pos_hint={'x': .45, 'y': .7})
          self.add_widget(self.username)
  
          self.add_widget(
              Label(text='Next, enter your handicap: ', font_size=50, size_hint=(.0, .1), pos_hint={'x': .25, 'y': .5}))
          self.handicap = TextInput(multiline=False, size_hint=(.45, .1), pos_hint={'x': .45, 'y': .5})
          self.add_widget(self.handicap)
  
          self.add_widget(Label(text=&quot;*If you don't have a handicap or don't \nknow what your handicap is, enter N/A&quot;,
                                color=(1, 0, 0), font_size=35, size_hint=(.0, .1), pos_hint={'x': .253, 'y': .44}))
  
          self.submit2 = Button(text=&quot;Continue&quot;, font_size=50, background_color=(160 / 255, 197 / 255, 196 / 255, 0),
                                size_hint=(.15, .15), pos_hint={'center_x': .5, 'y': .3})
          self.add_widget(self.submit2)
          self.submit2.bind(on_press=self.pressed)
          self.submit2.bind(on_press=self.screen_transition)
  
      def pressed(self, instance):
          username = self.username.text
          handicap = self.handicap.text
          print(&quot;Username:&quot;, username, &quot;Handicap:&quot;, handicap)
  
      def screen_transition(self, *args):
          self.manager.current = 'register'
  
  
  class RegisterWindow(Screen):
      def __init__(self, **kwargs):
          super(RegisterWindow, self).__init__(**kwargs)
  
          self.add_widget(Label(text = &quot;Hi&quot; + username))
  
  
  class Application(App):
      def build(self):
          Window.clearcolor = (160 / 255, 197 / 255, 196 / 255)
          sm = ScreenManagement(transition=SlideTransition())
          sm.add_widget(LoadingWindow(name='start'))
          sm.add_widget(LoginWindow(name='login'))
          sm.add_widget(RegisterWindow(name='register'))
          return sm
  
  
  if __name__ == &quot;__main__&quot;:
      Application().run()
  </code></pre>