File: _backend.py

package info (click to toggle)
python-mne 0.13.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 92,032 kB
  • ctags: 8,249
  • sloc: python: 84,750; makefile: 205; sh: 15
file content (27 lines) | stat: -rw-r--r-- 1,003 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Deal with pyface backend issues"""
# Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
#
# License: BSD (3-clause)


def _check_backend():
    from ..utils import _check_pyface_backend
    try:
        from pyface.api import warning
    except ImportError:
        warning = None

    backend, status = _check_pyface_backend()
    if status == 0:
        return
    elif status == 1:
        msg = ("The currently selected Pyface backend %s has not been "
               "extensively tested. We recommend using qt4 which can be "
               "enabled by installing the pyside package. If you proceed with "
               "the current backend pease let the developers know your "
               "experience." % backend)
    elif status == 2:
        msg = ("The currently selected Pyface backend %s has known issues. We "
               "recommend using qt4 which can be enabled by installing the "
               "pyside package." % backend)
    warning(None, msg, "Pyface Backend Warning")