Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D Documentation
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • anywave
  • Documentation
  • Wiki
  • Python_plugins

Last edited by Bruno Colombet Jul 22, 2025
Page history
This is an old version of this page. You can view the most recent version or browse the history.

Python_plugins

A Python plugin is a folder located in the user home dir.
Documents\AnyWave\Plugins\Python on Windows.
/home/username/AnyWave/Plugins/Python on Linux.
/users/username/AnyWave/Plugins/Python on MacOS.

Requirements

The annywave_plugin_api package : https://pypi.org/project/anywave-plugin-api/1.0/

Setup your python installation in the Preferences

image

If you want to use a venv, just pick the folder of your venv, AnyWave will detect the Python interpreter.

Install the anywave package into your Python environment

First, make sure pip supports wheel format:

python pip install --upgrade pip

Install the package:

pip install anywave-plugin-api==1.0

1. Starting with anywave v2105 you can use the Plugin Creation Tool to create a new plugin.

image

1.1 Make it by your own

Create a folder in AnyWave/Plugins/Python directory.
In that directory, create two files:

  • desc.txt
  • __main.py__

1.1.1 desc.txt

This file is a simple text file that must contain the following lines:
name = My Plugin
description = Do something on data

1.1.1.1 optional lines

To tune up the behavior of your plugin you may add some flags to tell AnyWave what you plugin can do:
flags=nodatarequired -> this line will inform anywave that your plugin can run even if no data file is open.
flags=canrunfromcommandline -> this flag indicates that your plugin can be run from the command line.
You can combine flags by separating them with a colon (:)
flags=nodatarequired:canrunfromcommandline

Put your plugin in a submenu, by adding the following line:
category=Process:MyCategory:My plugin
This line will create a sub menu called MyCategory in the Processes Menu of AnyWave and a link to launch the plugin.

1.1.2 __main__.py

This is the module AnyWave will execute as your main entry point for the plugin.
The first lines of code must be the following:

import anywave, sys

anywave.init(sys.argv)

2. Compiled plugin

There are several python tools to build an exe file from a python package, like pyexec. This is supported by AnyWave that will run the py.exe as if it was a regular python plugin.
Inform AnyWave to run an exe by adding the following line in desc.txt:
compiled plugin=nameofexefile

3. check that AnyWave detects your plugin at startup

Close and relaunch AnyWave, your plugin should appear in the Processes menu.

Clone repository
  • Build_AnyWave
  • CLI
  • CLI_List
  • Changes
  • ExportData
  • ICA
  • Imaginary Coherence
  • MATLAB anywave function
  • MATLAB_BIDS
  • MATLAB_change_sig_prop
  • MATLAB_debug
  • MATLAB_get_data
  • MATLAB_get_markers
  • MATLAB_get_props
  • MATLAB_init
View All Pages