File: plugin.py

package info (click to toggle)
mma 21.09-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 51,828 kB
  • sloc: python: 16,751; sh: 26; makefile: 18; perl: 12
file content (21 lines) | stat: -rw-r--r-- 625 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Demo for using the data plugin

# We import the plugin utilities
from MMA import pluginUtils as pu
import MMA.gbl as gbl

def dataRun(ln):
    """ The actual plugin code. Note that it is called 
        via a standard mma data line with the plugin name
        inserted into that. The plugin converts that part
        of the line to something else ... in this case "Gm".
        However, there is nothing to stop your code from examining
        the line and changing anything in it.
    """
    
    return ['Gm'] + ln

# Entry for usage (mma -Iaddgm)

def printUsage():    
    print("Usage for the mma addgm plugin. ")