import sys print sys.version_infoIt is also sometimes important to know what Maya version is currently running, especially for backwards compatibility.
import maya.cmds as cmds print cmds.about(version=1)
If you are using an IDE and want to make sure your code will execute as expected without having to worry about version control set its default Python interpreter to C:\Program Files\Autodesk\Maya2009\bin\mayapy.exe.

