BrainVoyager v22.0

Python Scripting and Plugin Development

BrainVoyager 20.0 introduces Python as a powerful language for both scripting and plugin development. In this version the new Python tools are marked as experimental since support for all envisioned roles of Python have not been implemented, including debugging facilities and full documentation. Using provided example code, it should be, however, relatively easy to start using Python in BrainVoyager.

As an interpreted language, Python allows scripting and fast prototyping in an interactive shell or console. Despite being an interpreted language, extension modules such as NumPy and SciPy turn Python into a high performance language for scientific computing. Combined with the interactive interpreter these features have made the language very popular for scientific programming and prototyping in a similar way as Matlab.  "Cython" is a version of standard Python (also called "CPython") that even achieves performance very close to C and C++).

In BrainVoyager 21, experimental support for Python was provided for macOS and Windows. Since BrainVoyager 21.0 Python support is available also for Linux. The goal of Python support is to provide an easy and comprehensive alternative to both the current JavaScript scripting as well as C++ plugin development. The core of the new tools forms an embedded Python interpreter (based on PythonQt, see Since the Python interpreter is enriched with access to the Qt API, it is now easy to add cross-platform user interfaces for scripts and plugins in Python. The interpreter also has full access to the BrainVoyager API enabling scripting batch programming in the same way as with the JavaScript environment. Since Python supports powerful modules such as NumPy and SciPy, the same language can also be used to extend BrainVoyager's computational capabilities and to mix it with existing Python routines.

For further details, consult the Python Developer Guide that has been introduced in BrainVoyager 20.4. The guide can be invoked from the Help menu of BrainVoyager's main window or by clicking the Guide button of the Python Development (IDE) window.

Copyright © 2020 Rainer Goebel. All rights reserved.