Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Commit

Permalink
implement is_jupyter_notebook()
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Feb 10, 2019
1 parent d236892 commit 49976ea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion alphatwirl/parallel/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ def _build_parallel_multiprocessing(quiet, processes):

##__________________________________________________________________||
def is_jupyter_notebook():
return True
try:
from IPython import get_ipython
if 'IPKernelApp' in get_ipython().config:
return True
except:
pass
return False

##__________________________________________________________________||
@_deprecated(msg='use alphatwirl.parallel.build.build_parallel() instead.')
Expand Down

0 comments on commit 49976ea

Please sign in to comment.