userSetup.py file takes precedence over userSetup.mel
so, i wanted to add some paths to "MAYA_SCRIPT_PATH" via python
this example for getting variables works fine
Code:


import maya.mel as mel
import os.path
import maya.cmds as cmds
def printMayaPaths():
        msp = mel.eval('getenv MAYA_SCRIPT_PATH')
        msp = str(msp)
        myList = msp.split(';')
        for each in myList:
                print each



but this one gives error
Code:

def addFolderToMayaPath(p):
        msp = mel.eval('getenv MAYA_SCRIPT_PATH')
        msp = str(msp)
        myList = msp.split(';')
        msp += ";" + p
        type(msp)
        mel.eval('putenv "MAYA_SCRIPT_PATH" ' + msp)
        maya.cmds.rehash()



QUESTION:
how exactly to add python list or path to MAYA_SCRIPT_PATH via python
huge thanks in advance everyone for time and suggestions and solutions
regards,lala

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/434728f1-4a8d-442c-8b2d-76b16349dbc2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to