pymel.tools.envparse.parseMayaenv

parseMayaenv(envLocation=None, version=None)

parse the Maya.env file and set the environement variablas and python path accordingly. You can specify a location for the Maya.env file or the Maya version