]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PythonFeaturesPlugin/PythonFeaturesPlugin.py
Salome HOME
The ability to register python plugins added
[modules/shaper.git] / src / PythonFeaturesPlugin / PythonFeaturesPlugin.py
index e7a28080540a8284c36a9fbb433693512607cb86..dc4219d11d91cf038268998b30f87653127fa066 100644 (file)
@@ -1,9 +1,10 @@
-from ModelAPI import *
-import PythonFeaturesPlugin_Box
+import ModelAPI
+from PythonFeaturesPlugin_Box import PythonFeaturesPlugin_Box
 
-class PythonFeaturesPlugin(ModelAPI_Plugin):
+class PythonFeaturesPlugin(ModelAPI.ModelAPI_Plugin):
+  
   def __init__(self):
-    ModelAPI_Plugin.__init__(self)
+    ModelAPI.ModelAPI_Plugin.__init__(self)
     pass
 
   def createFeature(self, theFeatureID):
@@ -13,5 +14,6 @@ class PythonFeaturesPlugin(ModelAPI_Plugin):
       raise StandardError("No such feature %s"%theFeatureID)
 
 plugin = PythonFeaturesPlugin()
-ModelAPI_Session_get().registerPlugin(plugin)
-
+aSession = ModelAPI.ModelAPI_Session.get()
+print "Module loaded. Session", aSession
+aSession.registerPlugin(plugin)