Skip to content
No description, website, or topics provided.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
http_button_server.py

README.md

http-button-server

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.

Usage:
1. Create a callback function:
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()
You can’t perform that action at this time.