Nice little tool which looks for you ‘scenes’ folder and sets the project to that location:
import maya.cmds as cmds import maya.mel as mel import maya.OpenMaya as om def setProj(): # find directory currentDir = cmds.file( query = True, location = True ) # dicect directory and set project try: projectDir,garbage = currentDir.split( 'scenes' ) except: return om.MGlobal.displayError( 'You need to have you file in a project folder structurte first' ) mel.eval( 'setProject ' + '"' + projectDir + '"' ) om.MGlobal.displayInfo( 'current project set to : ' + projectDir ) del projectDir del garbage setProj()