Maya get version
to get the version in Maya, don’t use
this returns the Maya version (as a string), e.g.
u'2026'
.But it doesn’t work when you run Maya Preview Release, then it returns
u'Preview Release'
instead use
which always returns the correct version (as a float), e.g.
2026