daily pastebin goal
89%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from kivy.app import App
  2. from kivy.uix.gridlayout import GridLayout
  3. from kivy.uix.label import Label
  4. from kivy.uix.textinput import TextInput
  5.  
  6.  
  7. class LoginScreen(GridLayout):
  8.  
  9.     def __init__(self, **kwargs):
  10.         super(LoginScreen, self).__init__(**kwargs)
  11.         self.cols = 2
  12.         self.add_widget(Label(text='User Name'))
  13.         self.username = TextInput(multiline=False)
  14.         self.add_widget(self.username)
  15.         self.add_widget(Label(text='password'))
  16.         self.password = TextInput(password=True, multiline=False)
  17.         self.add_widget(self.password)
  18.  
  19.  
  20. class MyApp(App):
  21.  
  22.     def build(self):
  23.         return LoginScreen()
  24.    
  25. if __name__ = '__main__':
  26.     MyApp().run()
  27.    
  28. from TouchInterface import MyApp
  29.  
  30.  
  31. if __name__ == '__main__':
  32.     # Point where I start up other Modules in future ...
  33.     MyApp().run()
  34.    
  35. [INFO   ] [Logger      ] Record log in /root/.kivy/logs/kivy_16-07-04_36.txt
  36. [INFO   ] [Kivy        ] v1.9.2-dev0
  37. [INFO   ] [Python      ] v2.7.9 (default, Mar  8 2015, 00:52:26)
  38. [GCC 4.9.2]
  39. [INFO   ] [Factory     ] 193 symbols loaded
  40. [INFO   ] [Image       ] Providers:  (img_tex, img_dds, img_gif, img_sdl2, img_pil, img_ffpyplayer ignored)
  41. [CRITICAL] [App         ] Unable to get any Image provider, abort.
  42.    
  43. runner.py
  44. example
  45.   - assets
  46.       - image.png
  47.   - __init__.py
  48.   - example.py
  49.   - example.kv
  50.    
  51. from example import run
  52.  
  53. if __name__ == "__main__":
  54.     run()
  55.    
  56. from .example import run
  57.    
  58. from kivy.app import App
  59.  
  60. class ExampleApp(App):
  61.     kv_file: 'example/example.kv'
  62.  
  63. def run():
  64.     ExampleApp().run()
  65.    
  66. #:kivy 1.10.0
  67. #:import kivy kivy
  68. #:import win kivy.core.window
  69.  
  70. FloatLayout:
  71.     canvas:
  72.         Color:
  73.             rgb: 1, 1, 1,
  74.         Rectangle:
  75.             source: 'example/assets/image.png'
  76.             size: self.size
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top