AWS Thinkbox Discussion Forums

Multiple values for SetProcessEnvironmentVariable

Hi.

For the SetProcessEnvironmentVariable method, if there are multiple values I want to give to a particular key, do I join them with ; the same way one would do in Windows environment?

key = 'PATH' value = ['C:/', 'D:/', 'E:/'] deadlinePlugin.SetProcessEnvironmentVariable(key, ';'.join(value))

Environment variables are just strings, so it depends on how the application will read the data you’re setting.

Now, the PATH environment variable is fairly important for Windows, macOS, and Linux so they’re able to find programs. Windows does use semi-colons though. Taking a step back here, why are you trying to reset “PATH”?

Hi.

The PATH was just an example. Sorry for the confusion. To be exact, it was PYTHONPATH, MAYA_MODULE_PATH and MAYA_SCRIPT_PATH that I tried to set. The values are given to me from the pipeline team, each can have up to 3 values.

Semi-colons should work there then. If not, ask the Pipeline team. :smiley:

Privacy | Site terms | Cookie preferences