私は、自動補完付きのjupiterノートブックでテキスト入力ウィジェットを使いたいと思っています。したがって私はAutocompleteInput()
をbokeh.models.widgets.inputs
から使いました。jupyterノートブック内のbokehウィジェットからデータにアクセス
from bokeh.models.widgets.inputs import AutocompleteInput
from bokeh.io import output_notebook
from bokeh.plotting import show
output_notebook()
txt_input = AutocompleteInput(completions=['val1', 'val2'])
show(txt_input)
Displaying the widget and autocompletion works fineが、どのように私は変更時に入力ウィジェットの値にアクセスすることができますか? txt_input.value
は、デフォルト値(空の文字列)のみを返します。
ニースハック!私は 'bokeh.models import CustomJS'からさらに実行する必要があることに気付くかもしれません。 – joergd
私は答えのコードに追加しました – bigreddot