1
2 """
3 Allows to query the maya environment, like variables, version numbers and system
4 paths.
5 """
6 __docformat__ = "restructuredtext"
7
8 from maya import cmds
9
10 __all__ = ("appVersion", )
11
13 """
14 :return: tuple( float( version ), int( bits ), string( versionString ) ), the
15 version will be truncated to *not* include sub-versions
16 :note: maya.cmds.about() will crash if called with an external interpreter
17 """
18 bits = 32
19 if cmds.about( is64=1 ):
20 bits = 64
21
22 versionString = cmds.about( v=1 )
23 version = versionString.split( ' ' )[0]
24 if version.find( '.' ) != -1:
25 version = version[0:3]
26
27
28 version = float( version )
29 return ( version, bits, versionString )
30