Salome HOME
Zcracks plugin adaptation to new Zcracks tool
[modules/smesh.git] / src / Tools / ZCracksPlug / zcracks_plugin.py
index 85ced69cfd809c3643796881a3d154fd9b7e4409..60a09a8e753688202add673946f2ae4a71466abc 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2006-2013  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
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # 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