This document is provided as a reference to advanced MMA users writing plugins. It does not pretend to be definitive or complete. It is a supplement to the main reference manual.
As mentioned in the MMA Reference Guide, a plugin must have its own directory. The name of this directory must be the same as the name you with to assign to the plugin (without the ``@'' prefix). So, the plugin @HELLO will have a directory hello.
In this directory you must have the following files:
In the Reference Manual in the Plugins section, we discuss the fact that characters in filenames are, mostly, not case sensitive. However, we recommend that you use lower case characters for all file and directory names.
When the PLUGIN command finds the file plugin.py it is loaded into the running MMA program. The plugin loader will attempt to register three functions or methods from plugin.py:
run(param-list)-- this is the code executed when your new command is encountered in a MMA script.
trackRun(TrackName, param-list)-- this is the code executed when your new command is encountered as part of a track command.
printUsage()-- this code is used when you request a usage message from the command line using the ``-I'' option.
Bob van der Poel 2016-06-11