Advertisement
Guest User

Untitled

a guest
Jun 28th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. class Test(object):
  2. def __init__(self, attr):
  3. self.attr = attr
  4.  
  5. class LoginScreen(GridLayout):
  6. def __init__(self, **kwargs):
  7. super(LoginScreen, self).__init__(**kwargs)
  8. self.cols = 2
  9. self.add_widget(Label(text='User Name'))
  10. self.username = TextInput(multiline=False)
  11. self.add_widget(self.username)
  12. self.add_widget(Label(text='password'))
  13. self.password = TextInput(password=True, multiline=False)
  14. self.add_widget(self.password)
  15. print self.username.text
  16.  
  17. class Login(App):
  18.  
  19. def build(self):
  20. Window.borderless = True
  21. return LoginScreen()
  22.  
  23. import classtest, gui
  24. users = ['user_name1', 'user_name2', 'user_name3']
  25. gui.Login().run()
  26. for u in users:
  27. test = classtest.Test(u) # this should update the user text field on the windows login automatically, but how?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement