]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Issue 0020739: EDF 1215 STUDY : Know the hexadecimal version of Salome
authorvsr <vsr@opencascade.com>
Tue, 2 Mar 2010 09:44:41 +0000 (09:44 +0000)
committervsr <vsr@opencascade.com>
Tue, 2 Mar 2010 09:44:41 +0000 (09:44 +0000)
src/KERNEL_PY/salome_version.py

index bd0609ade363d67598bda03600c156babba53be2..f323473c481dbf207046d222b58df8ce9bffe67a 100644 (file)
 #  Author : Vadim SANDLER
 #  Module : SALOME
 #
+
+__ALL__ = [
+    "getVersion",
+    "getVersionMajor",
+    "getVersionMinor",
+    "getVersionRelease",
+    "getVersions",
+    "getXVersion",
+    ]
+
 _salome_versions = {}
 
 def getVersion( mod = "KERNEL" ):
@@ -108,3 +118,10 @@ def getVersions( mod = "KERNEL" ):
         pass
     return [ major, minor, rel ]
     
+def getXVersion( mod = "KERNEL" ):
+    """
+    Get SALOME module version as list of [major, minor, release] numbers
+    Returns: version numbers list
+    """
+    major, minor, rel = getVersions( mod )
+    return hex( (major<<16) + (minor<<8) + rel )