title: Save simpleapp bokeh plot to standalone html file
body: <p>The following script (from <a href="https://stackoverflow.com/a/29540458/1251007">this SO answer</a>) generates a simpleapp Bokeh plot. </p>
  
  <p><strong>How can I save the output to a standalone html file?</strong></p>
  
  <pre><code>import bokeh.plotting as bk
  from bokeh.models import ColumnDataSource, Plot
  from bokeh.models.widgets import Select, AppVBox
  from bokeh.simpleapp import simpleapp
  
  data = {"a": {"x": [1,2,3], "y": [1,2,3]},
          "b": {"x": [3,2,1], "y": [1,2,3]},
          "c": {"x": [2,2,2], "y": [1,2,3]},}
  
  
  options = ["a", "b", "c"]
  select1 = Select(name = 'ticker1', value = options[0], options = options)
  
  @simpleapp(select1)
  def test_layout(ticker1):
      p = bk.figure(title = "layout test")
  
      chart_data = data[ticker1]
  
      df = ColumnDataSource(data = chart_data)
      p.circle(x = chart_data["x"], y = chart_data["y"])
  
      return {'plot': p}
  
  @test_layout.layout
  def layout(app):
      return AppVBox(app=app, children=['ticker1', 'plot'])
  
  test_layout.route("/bokeh/layout/")
  </code></pre>
  
  <p>I tried changing the <code>layout(app)</code> to make use of <code>file_html</code>. This generates the initial plot, but the combobox does not work. I think that <code>file_html</code> is only for single plot objects, not for something like the <code>simpleapp</code> that I'm using.</p>
  
  <pre><code>from bokeh.embed import file_html
  from bokeh.resources import CDN
  
  def layout(app):
      # save standalone html
      html = file_html(AppVBox(app=app, children=['ticker1', 'plot']), CDN, "title")
      f = open("bokeh_standalone.html", "w")
      f.write(html)
      f.close
  </code></pre>