hello_world2.py

open in new tab
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
"""
Simple hello world following the recommended style of writing apps,
using a custom widget that is populated in its ``init()``.
"""


from flexx import app, ui

class Main(ui.Widget):

    def init(self):

        self.b1 = ui.Button(text='Hello')
        self.b2 = ui.Button(text='World')

if __name__ == '__main__':
    m = app.launch(Main)
    app.run()