@@ -27,6 +27,8 @@ Bokeh
在PyWebIO中,你也可以使用 ``bokeh.io.show()`` 来显示一个Bokeh App,代码示例见 `bokeh_app.py <https://github.com/wang0618/PyWebIO/blob/master/demos/bokeh_app.py>`_。
+.. note:: Bokeh App当前仅支持默认的Tornado后端
+
.. image:: https://cdn.jsdelivr.net/gh/wang0618/pywebio-chart-gallery@master/assets/bokeh.png
pyecharts
@@ -80,6 +80,10 @@ def show_app(app, state, notebook_url, port=0, **kw):
from pywebio.platform.tornado import ioloop
loop = ioloop()
+ if loop is None:
+ toast("Currently only supports showing bokeh application in Tornado backend",
+ color='error', duration=0)
+ return
loop.make_current()
asyncio.set_event_loop(loop.asyncio_loop)
# loop = IOLoop.current()