Hello I tried to set environement variable using python. My python file looks like this.
#!/usr/bin/python2.7
import os
os.system("check")
Please see here file check is csh file which is something like this.
#!usr/bin/csh
setenv VARIABLE 1
but when i check from my shell environment variable is not set. I understand that when I call os.system it makes another subshell and sets variable there. I tried directly running csh file and same issue. I also tried.
os.system("setenv VARIABLE 1")
it throws error command not found. That was my earlier reason to put the command in diff file and calling it.
All I need to do is set the environment variable from my python script in current shell