I am using Bokeh to produce HTML code including figures with show method This method ends on opening default browser with HTML opened in it.
I want to save the HTML code, without showing it. How can I do that ?
Solution is to replace calls to show by calls to save.
 
    
    Use output_file({file_name}) instead of output_notebook(). You can call either save or show method. Remember each time you call save or show method the file will be rewritten.
from bokeh.plotting import figure, output_file, save
p = figure(title="Basic Title", plot_width=300, plot_height=300)
p.circle([1, 2], [3, 4])
output_file("output_file_name.html")
save(p)
 
    
    