Tellurium Plugins
Python ctypes wrapper documentation
 All Functions Variables Groups Pages
telGetPluginInformation.py

This example shows

  1. How to create a plugin manager
  2. Get Plugin Names
  3. Get a handle to a plugin
  4. Obtain some info from the plugin
1 from teplugins import *
2 
3 try:
4  # Create a plugin manager
6 
7  # Load plugins from the plugin folder
8  result = loadPlugins(pm)
9 
10  print 'Number of Plugins: ' + `getNumberOfPlugins(pm)`
11  print 'Plugin Names: ' + `getPluginNames(pm)`
12 
13  #Go trough all plugins and print information
14  aPlugin = getFirstPlugin(pm)
15  while True:
16  if aPlugin == None:
17  break
18  print '=========================================='
19  print 'Name: ' + `getPluginName(aPlugin)`
20  print 'Author: ' + `getPluginAuthor(aPlugin)`
21  print 'Copyright: ' + `getPluginCopyright(aPlugin)`
22  print 'Version: ' + `getPluginVersion(aPlugin)`
23  print 'Category: ' + `getPluginCategory(aPlugin)`
24  print 'Description:' + `getPluginDescription(aPlugin)`
25  print 'Parameters: ' + `getListOfPluginPropertyNames(aPlugin)`
26 
27  #get next plugin
28  aPlugin = getNextPlugin(pm)
29 
30  unLoadPlugins(pm)
31 
32 except Exception as e:
33  print 'There was a problerm: ' + `e`