File: mne_sys_info.py

package info (click to toggle)
python-mne 1.3.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 100,172 kB
  • sloc: python: 166,349; pascal: 3,602; javascript: 1,472; sh: 334; makefile: 236
file content (35 lines) | stat: -rw-r--r-- 902 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
28
29
30
31
32
33
34
35
#!/usr/bin/env python
"""Show system information.

Examples
--------
.. code-block:: console

    $ mne sys_info

"""

# Authors : Eric Larson <larson.eric.d@gmail.com>

import sys
import mne


def run():
    """Run command."""
    parser = mne.commands.utils.get_optparser(__file__, usage='mne sys_info')
    parser.add_option('-p', '--show-paths', dest='show_paths',
                      help='Show module paths', action='store_true')
    parser.add_option('-d', '--developer', dest='developer',
                      help='Show additional developer module information',
                      action='store_true')
    options, args = parser.parse_args()
    dependencies = 'developer' if options.developer else 'user'
    if len(args) != 0:
        parser.print_help()
        sys.exit(1)

    mne.sys_info(show_paths=options.show_paths, dependencies=dependencies)


mne.utils.run_command_if_main()