File: environment.py

package info (click to toggle)
brian 2.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,872 kB
  • sloc: python: 51,820; cpp: 2,033; makefile: 108; sh: 72
file content (17 lines) | stat: -rw-r--r-- 350 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""
Utility functions to get information about the environment Brian is running in.
"""

import builtins


def running_from_ipython():
    """
    Check whether we are currently running under ipython.

    Returns
    -------
    ipython : bool
        Whether running under ipython or not.
    """
    return getattr(builtins, "__IPYTHON__", False)