smesh.Compute(mesh, box)
sg.updateObjBrowser(1);
+#####################################################################
# SUPERVISOR module is not available since SALOME 5.0 version
-defineSuperV = 0
-
-if (defineSuperV != 0) & (sys.platform != "win32"):
- print
- print "============= Test Supervisor ============================="
- print
-
+#####################################################################
+print
+print "============= Test Supervisor ============================="
+print
+import salome_version
+versions = salome_version.getVersions()
+if versions[0] < 5:
+ # SUPERV module is avaiable
comp = catalog.GetComponent("SUPERV")
if comp is None:
raise RuntimeError,"Component SUPERV not found in Module Catalog."
sg.updateObjBrowser(1);
pass
+else:
+ # SUPERV module is NOT avaiable
+ print "WARNING! Supervisor is not avaiable in this version of SALOME!"
+ pass
print
print "============= Test VISU and MED ============================="
except:
pass
return None
+
+def getVersions( mod = "KERNEL" ):
+ """
+ Get SALOME module version as list of [major, minor, release] numbers
+ Returns: version numbers list
+ """
+ try:
+ major = int( getVersionMajor( mod ) )
+ except:
+ major = 0
+ pass
+ try:
+ minor = int( getVersionMinor( mod ) )
+ except:
+ minor = 0
+ pass
+ try:
+ rel = int( getVersionRelease( mod ) )
+ except:
+ rel = 0
+ pass
+ return [ major, minor, rel ]
+