text.on_change Not Responsive for Bokeh TextInput

前端 未结 1 1582
说谎
说谎 2020-11-30 15:03

I am a beginner to using Python\'s bokeh plotting tool and widgets. In my following code I am trying to have the title of the graph change to the value of the TextInput box.

相关标签:
1条回答
  • 2020-11-30 15:25

    By you using show(grid) you are creating a standalone HTML document as output. This has no possible way of running real python callbacks, because browsers have no ability to run python code. Running real callbacks requires having a connection to a persistent Python process. That is the Bokeh server. Using real python callbacks (i.e. with on_change) is only possible in bokeh server applications (that is the purpose of the bokeh server, to be the thing that runs real python callbacks.) See:

    https://docs.bokeh.org/en/latest/docs/user_guide/server.html

    It's also possible to embed Bokeh server apps in Juyter notebooks, for an example of that, see here:

    https://github.com/bokeh/bokeh/blob/master/examples/howto/server_embed/notebook_embed.ipynb

    0 讨论(0)
提交回复
热议问题