X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_SWIG%2Fsmesh.py;h=99ab3db11d537af2fb76582b1450015b29d5f34b;hb=744bac55993c4ff67032dadeb9b646b081e2d5cb;hp=9cfc32f086efad3cab08eb5de5de77d7c0a285a9;hpb=d6941cf3470c170ead7727966a851e564f027944;p=modules%2Fsmesh.git diff --git a/src/SMESH_SWIG/smesh.py b/src/SMESH_SWIG/smesh.py index 9cfc32f08..99ab3db11 100644 --- a/src/SMESH_SWIG/smesh.py +++ b/src/SMESH_SWIG/smesh.py @@ -33,6 +33,7 @@ import salome from salome import * import geompy + import SMESH, SALOMEDS from salome.smesh import smeshBuilder @@ -58,7 +59,8 @@ for pluginName in os.environ[ "SMESH_MeshersList" ].split( ":" ): try: exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName)) except Exception, e: - print "Exception while loading %s: %s" % ( pluginBuilderName, e ) + from salome_utils import verbose + if verbose(): print "Exception while loading %s: %s" % ( pluginBuilderName, e ) continue exec( "from salome.%s import %s" % (pluginName, pluginBuilderName)) plugin = eval( pluginBuilderName ) @@ -87,28 +89,30 @@ if smesh: print """ =============================================================================== -WARNING: | -Usage of smesh.py is deprecated in SALOME V7.2! | -smesh.py will be removed in a future version! | -TODO: | -The following changes in your scripts are required to avoid this message: | - | -replace | -------- | - | -import smesh, SMESH, SALOMEDS | -smesh.SetCurrentStudy(theStudy) | - | -with | ----- | - | -import SMESH, SALOMEDS | -from salome.smesh import smeshBuilder | -smesh = smeshBuilder.New(theStudy) | - | -you also need to modify some lines where smeshBuilder is used instead of smesh| - | -algo=smesh.xxxx ==> algo.smeshBuilder.xxxx | - | +WARNING: +Usage of smesh.py is deprecated in SALOME V7.2! +smesh.py will be removed in a future version! +TODO: +The following changes in your scripts are required to avoid this message: + +replace +------- + +import smesh, SMESH +smesh.SetCurrentStudy(theStudy) + +with +---- + +import SMESH +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New(salome.myStudy) + +you also need to modify some lines where smeshBuilder is used instead of smesh + +algo=smesh.xxxx ==> algo=smeshBuilder.xxxx + +See also SMESH User's Guide for more details + =============================================================================== """