X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FZCracksPlug%2Fzcracks_plugin.py;h=60a09a8e753688202add673946f2ae4a71466abc;hp=85ced69cfd809c3643796881a3d154fd9b7e4409;hb=7ea81bbe6e068500dbaf7ff693dd05f33b974c53;hpb=209c9bd9c33255f46bfa60acc76c4c3878f815aa diff --git a/src/Tools/ZCracksPlug/zcracks_plugin.py b/src/Tools/ZCracksPlug/zcracks_plugin.py index 85ced69cf..60a09a8e7 100644 --- a/src/Tools/ZCracksPlug/zcracks_plugin.py +++ b/src/Tools/ZCracksPlug/zcracks_plugin.py @@ -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 @@ -18,21 +18,14 @@ # 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