From 5c12df7756a08e9cf1739d905285a136dbe43de1 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 2 Mar 2010 09:44:41 +0000 Subject: [PATCH] Issue 0020739: EDF 1215 STUDY : Know the hexadecimal version of Salome --- src/KERNEL_PY/salome_version.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/KERNEL_PY/salome_version.py b/src/KERNEL_PY/salome_version.py index bd0609ade..f323473c4 100644 --- a/src/KERNEL_PY/salome_version.py +++ b/src/KERNEL_PY/salome_version.py @@ -24,6 +24,16 @@ # 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 ) -- 2.39.2