Salome HOME
Zcracks plugin adaptation to new Zcracks tool
[modules/smesh.git] / src / Tools / ZCracksPlug / zcracks_plugin.py
index e97c6ddd32884d34272cb04a77904d105d1e4bcb..60a09a8e753688202add673946f2ae4a71466abc 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2006-2015  EDF R&D
+# Copyright (C) 2006-2016  EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-import SalomePyQt
-sgPyQt = SalomePyQt.SalomePyQt()
-import eficasSalome
-
-class EficasForZcracks(eficasSalome.MyEficas):
-    """
-    """
-    def __init__(self, fichier = None, version = None):
-        eficasSalome.MyEficas.__init__(self, sgPyQt.getDesktop(),
-                                       "ZCRACKS",
-                                       fichier, version = version)
-        #sgPyQt.createView(custom_appli.widgetname, self)
-
+import os
 
 def ZcracksLct(context):
-  
-  window=EficasForZcracks()
-  window.show()
+    import os,subprocess
+    command = ". ${ZCRACKSHOME}/salome_do_config.sh ; "
+    command += 'zcracksLaunch.py &'
+    if command is not "":
+      try:
+        subprocess.check_call(command, executable = '/bin/bash', shell = True, bufsize=-1)
+      except Exception, e:
+        print "Error: ",e