""" A module to show off inheritance in Kivy Author: Walker M. White (wmw2) Date: October 28, 2017 (Python 3 Version) """ import kivy import kivy.app import kivy.uix.label from kivy.config import * from kivy.metrics import dp # ALL applications inherit from kivy.app.App class MyApp(kivy.app.App): """ A class is a window with 'Hello World!' inside INSTANCE ATTRIBUTE: _label: text display in window [kivy.uix.label.Label] """ # Override the build method (not __init__) to add buttons, etc. def build(self): """ Builds the application with a single internal panel """ Config.set('graphics', 'width', '400') Config.set('graphics', 'height', '400') self._label = kivy.uix.label.Label(size=(400,400), text='Hello World!', font_size=dp(36), bold=True) return self._label # Script Code. if __name__ == '__main__': MyApp().run()