def push_notebook(document=None, state=None, handle=None):
 if (state is None):
  state = _state
 if state.server_enabled:
  raise RuntimeError('output_server() has been called, which is incompatible with push_notebook')
 if (not document):
  document = state.document
 if (not document):
  warnings.warn('No document to push')
  return
 if (handle is None):
  handle = state.last_comms_handle
 if (not handle):
  warnings.warn('Cannot find a last shown plot to update. Call output_notebook() and show(..., notebook_handle=True) before push_notebook()')
  return
 to_json = document.to_json()
 if (handle.doc is not document):
  msg = dict(doc=to_json)
 else:
  msg = Document._compute_patch_between_json(handle.json, to_json)
 handle.comms.send(json.dumps(msg))
 handle.update(document, to_json)

def push_notebook ( document = None , state = None , handle = None ) : if ( state is None ) : state = _state if state . server_enabled : raise RuntimeError ( 'output_server() has been called, which is incompatible with push_notebook' ) if ( not document ) : document = state . document if ( not document ) : warnings . warn ( 'No document to push' ) return if ( handle is None ) : handle = state . last_comms_handle if ( not handle ) : warnings . warn ( 'Cannot find a last shown plot to update. Call output_notebook() and show(..., notebook_handle=True) before push_notebook()' ) return to_json = document . to_json ( ) if ( handle . doc is not document ) : msg = dict ( doc = to_json ) else : msg = Document . _compute_patch_between_json ( handle . json , to_json ) handle . comms . send ( json . dumps ( msg ) ) handle . update ( document , to_json )
update bokeh plots in a jupyter notebook output cells with new data or property values .