isjupyter#
- isjupyter(detailed=False)[source]#
Check if a command is running inside a Jupyter notebook.
Returns true/false if detailed=False, or a string for the exact type of notebook (e.g., Google Colab) if detailed=True.
- Parameters:
Examples:
if sc.isjupyter(): sc.options(jupyter=True) if sc.isjupyter(detailed=True) == 'colab': print('You are running on Google Colab')
New in version 3.0.0.