An implementation of a Python HTTP Server for easy use of HTML buttons for inputs.
When a button is pressed, web page form state is sent to callback function as a query string.
def p(qs):
print "BUTTON PRESSED", qs
2. Create a ButtonServer object:
b=ButtonServer(p)
3. Add buttons or textboxes to server:
b.add_button("Up", 'style="position: absolute; top: 0px; left: 0px;width: 60px;"')
b.add_button("Down", 'style="position: absolute; top: 20px; left: 0px; width: 60px;"')
b.add_textbox("tb", 'style="position: absolute; left: 200px; top: 0px"')
b.add_textbox("tb2", 'style="position: absolute; top: 0px; left: 60px"')
4. Run server
b.run()