Closed shakurgds closed 3 years ago
If you use PyWebIO in interactive execution environment of Python shell, IPython or jupyter notebook,
you need call send()
method explicitly to show output:
>>> put_text("Hello world!").send()
>>> put_table([
... ['A', 'B'],
... [put_markdown(...), put_text('C')]
... ]).send()
I also added this note to the document in https://github.com/wang0618/PyWebIO/commit/6c634b497238dd71d3a49f654eca5a3f7d7e5f88 , the updates will be visible in the next version.
It works now. Great!
If you use PyWebIO in interactive execution environment of Python shell, IPython or jupyter notebook, you need call
send()
method explicitly to show output:>>> put_text("Hello world!").send() >>> put_table([ ... ['A', 'B'], ... [put_markdown(...), put_text('C')] ... ]).send()
I also added this note to the document in 6c634b4 , the updates will be visible in the next version.
This means for deploying on the server, we have to delete .send attributes in order to be able to execute the files as .py files?
Remove .send()
call is not necessary when deploying on the server. But this may be confusing for otherone who don't konw this feature.
BUG Description
Running the following code to create Plotly Data Visualization inside Jupyter Notebook returns a blank page:
Environment Information
python3 --version
to view : 3.8python3 -c "import pywebio;print(pywebio.__version__)"
to view: 1.2.3