... | ... | @@ -6,16 +6,53 @@ Documents\AnyWave\Plugins\Python on Windows. |
|
|
/users/username/AnyWave/Plugins/Python on macOS.
|
|
|
|
|
|
# Requirements
|
|
|
A python local installation or a virtual environment located in the AnyWave/Plugin/Python/venv folder.
|
|
|
The folder is created the first time AnyWave is launched.
|
|
|
A good practice is to create a py venv using classic python -m venv command
|
|
|
Place the venv in the folder mentioned earlier and AnyWave will detect it when starting.
|
|
|
A python local installation or a virtual environment located in the AnyWave/Plugins/Python/venv folder.
|
|
|
The Plugins/Python/venv folder is created the first time AnyWave is launched.
|
|
|
A good practice is to create it using the classic python -m venv command
|
|
|
Place the venv in the folder mentioned earlier and AnyWave will detect it when starting.
|
|
|
|
|
|
## anywave package
|
|
|
The virtual environment must have the anywave-plugin-api package.
|
|
|
````python
|
|
|
pip install anywave-plugin-api
|
|
|
````
|
|
|
|
|
|
# Use the Plugin Creation Assistant
|
|
|

|
|
|
|
|
|

|
|
|
|
|
|
Change MATLAB option to Python!
|
|
|
|
|
|
# What is a Plugin?
|
|
|
It's a folder placed on Plugins/Python subfolders of AnyWave.
|
|
|
When AnyWave starts the first time it creates a folder named AnyWave in the user's home directory.
|
|
|
In the AnyWave folder you will find a Plugins\MATLAB folder.
|
|
|
Create a directory for you plugin in that location or use the Plugin Creation Assistant (see previous section).
|
|
|
|
|
|
## desc.txt
|
|
|
A file called desct.txt must be put in your Plugin.
|
|
|
This file is a simple text file that must contain the following lines:
|
|
|
*name = My Plugin*
|
|
|
*description = Do something on data*
|
|
|
When using the Plugin Creation Assistant, the file is created for you.
|
|
|
|
|
|
### 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.
|
|
|
|
|
|
## __main__.py
|
|
|
A filed called __main__.py must also be put in your Plugin.
|
|
|
This file along with desc.txt file will make your folder an AnyWave Python plugin.
|
|
|
When using the Plugin Creation Assistant, the file is created for you.
|
|
|
|
|
|
|
|
|
## [DEBUG Python plugin](/anywave/documentation/-/wikis/Python_debug)
|
|
|
|
... | ... | |