I want to run setenv command through python script, the linux command is as below
setenv MODEL path/to/the/model
I tried using os.environ(), but I couldn't get the right syntax.
note - I'm using python 2.7
I want to run setenv command through python script, the linux command is as below
setenv MODEL path/to/the/model
I tried using os.environ(), but I couldn't get the right syntax.
note - I'm using python 2.7
os.environ isn't a function. Check out the docs: https://docs.python.org/2/library/os.html#os.environ
This question may also be helpful to you: How to set environment variables in Python. If it is, pay attention to the comments on the top answer.