yes alternative solution works. thanks for sharing..

On Wednesday, 26 February 2014 17:42:43 UTC+5, lala wrote:
>
>
>
> 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/459a4a43-7726-4215-a975-23cd6897caaf%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to