Check salome version from python?

Hello,
is it possible to get the version of salome from the python console? (for example 9.11 or 9.12 etc)
thanks in advance,

Hello Franco,

here is a way to do it:

import salome.kernel
version=salome.kernel.__version__
print(version)

You can replace kernel by shaper or smesh.

Or another way:

import salome_version
version=salome_version.getVersion()
print(version)

You can also use getVersionMajor(), getVersionMinor(), getVersionRelease() or getVersions() from salome_version.

Christophe

1 Like