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