Skip to content

Commit

Permalink
Only output_notebook in notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristian Jensen authored and Kristian Jensen committed Jul 15, 2015
1 parent 48d16c0 commit b0b9df1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cameo/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

from __future__ import absolute_import, print_function
from .util import in_ipnb

non_zero_flux_threshold = 1e-6
ndecimals = 6
Expand Down Expand Up @@ -40,7 +41,8 @@
# TODO: This should also check if a bokeh server is actually running.
try:
from bokeh.plotting import output_notebook
output_notebook(hide_banner=True)
if in_ipnb():
output_notebook(hide_banner=True)
use_bokeh = True
except ImportError:
use_bokeh = False
Expand Down

0 comments on commit b0b9df1

Please sign in to comment.