I am using manjaro and bash shell. I am trying to hide passwords and secret keys in environment variables so that I can use them in my python script.
I tried this in my .bashrc file
export BOT_EMAIL="mymail@automail.com"
export BOT_PASS="pass_"
And if i run this script from terminal it runs
import os
a = os.environ.get("BOT_EMAIL")
b = os.environ.get("BOT_PASS")
print(a, b)
and gives me this output as expected
mymail@automail.com pass_
But the problem arrives when i try to run the script from sublime text 3 it gives me this
None None
which i think is sublime problem so I restarted sublime about ten times and even restarted my computer but it keeps giving None
.
I am noob in programming and linux it would be very helpful if someone can solve this problem.