browsergui package¶
Module contents¶
Tools for building GUIs that use a browser as the front-end.
| elements | Defines many types of GUI elements. | 
| events | Defines Eventsthat represent actions taken by the user. | 
| GUI(*elements, **kwargs) | Manages high-level features of the UI and coordinates between elements. | 
- 
class browsergui.GUI(*elements, **kwargs)[source]¶
- Manages high-level features of the UI and coordinates between elements. - Useful attributes/methods: - See this wiki page for a guide to the basics. - Parameters: - elements (Element) – elements to immediately include in the GUI
- title (str) – title of the GUI (i.e. title of browser tab)
 - 
body¶
- A - Containerthat contains all the Elements you put into the GUI.- Since Containers are mutable sequences, the following all do what you’d expect: - >>> gui.body.append(e) >>> gui.body.extend([e1, e2, e3, e4]) >>> gui.body[3] = e5 >>> del gui.body[0] 
 - 
dispatch_event(event)[source]¶
- Dispatch an event to whatever element is responsible for handling it. 
 - 
run(open_browser=True, port=None, quiet=False)[source]¶
- Displays the GUI, and blocks until Ctrl-C is hit or - stop_running()is called.- Raises a - RuntimeErrorif the GUI is already running.- Parameters: - open_browser (bool) – whether to open a browser tab for the GUI
- port (int) – which port to start the HTTP server on (Nonefor “don’t care”)
- quiet (bool) – whether to silence normal the server’s normal logging to stderr.
 
 - 
title¶
- The title for the browser page.