()
| 42 | |
| 43 | |
| 44 | def is_notebook_lab() -> bool: |
| 45 | try: |
| 46 | shell: str = get_ipython().__class__.__name__ # type: ignore |
| 47 | |
| 48 | # Shell: Google Colab |
| 49 | # TerminalInteractiveShell: Terminal running IPython |
| 50 | # ZMQInteractiveShell: Jupyter notebook/lab or qtconsole |
| 51 | return shell in {"Shell", "ZMQInteractiveShell"} |
| 52 | except NameError: |
| 53 | # Probably standard Python interpreter |
| 54 | return False |
| 55 | |
| 56 | |
| 57 | class ProgressBarsConsole(ProgressBars): |
no outgoing calls
no test coverage detected
searching dependent graphs…