Any change in the environment variable, in a Python example, is available only in that example, and is missing Once the example is closed, is there any way to stick them by putting them into the system?
I need to do this because in the studio where I work, like tools like Maya, are very much dependent on the environmental variable. Many platforms
My test code is
import os os.environ ['FAKE'] = 'C: \\'
Python Opening another instance and requesting to generate the os.environ ['fk']
a keyError
.
Note: Portability will be a problem, but I'm writing to check the small API OS version and if necessary it will be able to trigger different commands.
He said, I've gone the way to using the Windows Registry technique and just write the alternative methods that will call the shell script on other platforms because they create the requirements.
It is possible for you to change the environment variable through the registry with Windows, like T-OORK .
To resonate Brian's question, what are you trying to do? Maybe an easy way.
Comments
Post a Comment