Browse Source

New translations isNotebook.py (French)

l10n_v0.2.x
linlin 4 years ago
parent
commit
edc7fe114d
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      lang/fr/gklearn/utils/isNotebook.py

+ 16
- 0
lang/fr/gklearn/utils/isNotebook.py View File

@@ -0,0 +1,16 @@
""" Functions for python system.
"""

def isNotebook():
"""check if code is executed in the IPython notebook.
"""
try:
shell = get_ipython().__class__.__name__
if shell == 'ZMQInteractiveShell':
return True # Jupyter notebook or qtconsole
elif shell == 'TerminalInteractiveShell':
return False # Terminal running IPython
else:
return False # Other type (?)
except NameError:
return False # Probably standard Python interpreter

Loading…
Cancel
Save