mMeco - Python API


Please also check mMeco API Reference for all available objects and methods.

from    pprint import pprint

import  mMeco.mecoLib

meco = mMeco.mecoLib.Meco('--development main --app maya2020 --ignore-app-exec --raise-exceptions')

meco.execute()

# Get script file path where environment is written out
print(meco.allLib().settingsOperator().scriptFilePath())

# Get information from settings
print(meco.allLib().settingsOperator().masterProjectInternalPackagesPath())
print(meco.allLib().settingsOperator().masterProjectExternalPackagesPath())


pprint(meco.allLib().solver().developmentEnvPath().packages())
# ['mMayaCore',
#  'mApplication',
#  'mCore',
#  'mQt',
#  'mFileSystem',
#  'mDeveloper']

pprint(meco.allLib().solver().masterProjectInternalEnvPath().packages())
# [{'package': 'mMayaCore', 'versions': ['1.0.0']},
#  {'package': 'mApplication', 'versions': ['1.0.0']},
#  {'package': 'mProcess', 'versions': ['1.0.0']},
#  {'package': 'mMecoRelease', 'versions': ['1.0.0']},
#  {'package': 'mCore', 'versions': ['1.0.0']},
#  {'package': 'mMecoDocs', 'versions': ['1.0.0']},
#  {'package': 'mMecoPackage', 'versions': ['1.0.0']},
#  {'package': 'mMeco', 'versions': ['2.0.0']},
#  {'package': 'mMecoSettings', 'versions': ['1.0.0']},
#  {'package': 'mQt', 'versions': ['1.0.0']},
#  {'package': 'mFileSystem', 'versions': ['1.0.0']},
#  {'package': 'mDeveloper', 'versions': ['1.0.0']}]

pprint(meco.allLib().solver().masterProjectExternalEnvPath().packages())
# [{'package': 'extDoxygen', 'versions': ['3.5.5']}]
from    pprint import pprint

import  mMeco.mecoLib

# Use last to re-initialize last environment without solving/building.
meco = mMeco.mecoLib.Meco('--development main --app maya2020 --ignore-app-exec --raise-exceptions')

stdOut, stdErr = meco.executeCommand(['which maya'])

pprint(stdOut)
# /Applications/Autodesk/maya2020/Maya.app/Contents/bin/maya

pprint(stdErr)