2 from PythonFeaturesPlugin_Box import PythonFeaturesPlugin_Box
4 class PythonFeaturesPlugin(ModelAPI.ModelAPI_Plugin):
7 ModelAPI.ModelAPI_Plugin.__init__(self)
10 def createFeature(self, theFeatureID):
11 if theFeatureID == PythonFeaturesPlugin_Box.ID():
12 return PythonFeaturesPlugin_Box()
14 raise StandardError("No such feature %s"%theFeatureID)
16 plugin = PythonFeaturesPlugin()
17 aSession = ModelAPI.ModelAPI_Session.get()
18 print "Module loaded. Session", aSession
19 aSession.registerPlugin(plugin)