widgetbrowser.repl

HTTPREPL

class widgetbrowser.repl.HTTPREPL(locals=None)
dir(line)
Examine a partial line and provide attr list of final expr.
doc(line)
Examine a partial line and provide sig+doc of final expr.
execute(code)
Execute the given code in self.locals and return any stdout/sterr.
push(line)
Push ‘line’ and return exec results (None if more input needed).

WidgetReplApp

class widgetbrowser.repl.WidgetReplApp(locals=None, widget_browser=None, max_dialogs=10)
app(environ, start_response)
Main dispatcher. pops PATH_INFO and delegates to exposed methods.
dir(req, resp)
Push ‘line’ and return result of eval on the final expr.
doc(req, resp)
Push ‘line’ and return result of getargspec on the final expr.
index(req, resp)
Return an HTTP-based Read-Eval-Print-Loop terminal.
push(req, resp)
Push ‘line’ and return exec results as a bare response.

DeferredDisplay

class widgetbrowser.repl.DeferredDisplay(widget, value, **kw)

Wraps a widget and the args passed to display/render so we can defer its display to another request.

Note

The JS code is dependent on the output of __repr__ since it parses it to know a widget is being displayed so it can open an overlay.

display()
Displays the widget as it was intended to be displayed when it was wrapped.