Using Python to find out the Maya application directory

A quick tip to find out where your application directory is for Maya using Python. This is useful as it works across all operating systems and setups.

Run the following code in the Maya script editor:

# Import the Maya commands library
from maya import cmds

# Query the users Maya application directory
userAppDir = cmds.internalVar(userAppDir=True)

# Print the results in the output
print userAppDir

The output will display the application directory: