The question is: Is it simple to build a GUI that can be accessible remotely?
We worked a lot on this and we built a GUI library, portable, lightweight, Python!
Hosted on github https://github.com/dddomodossola/gui
Here is an example (suggestions are gratefully accepted :-) ):
import gui
from gui import *
class MyApp(App):
def __init__(self, *args):
super(MyApp, self).__init__(*args)
def main(self):
# the arguments are width - height - layoutOrientationOrizontal
wid = gui.Widget(120, 100, False, 10)
self.lbl = gui.Label(100, 30, 'Hello world!')
self.bt = gui.Button(100, 30, 'Press me!')
# setting the listener for the onclick event of the button
self.bt.set_on_click_listener(self, 'on_button_pressed')
# appending a widget to another, the first argument is a string key
wid.append('1', self.lbl)
wid.append('2', self.bt)
# returning the root widget
return wid
# listener function
def on_button_pressed(self):
self.lbl.set_text('Button pressed!')
self.bt.set_text('Hi!')
def test(self):
return ('test', 'data')
# starts the webserver
start(MyApp)