dmontgom
asked on
adding a line to .bash_profile and relaoding from python
Hi
From python I need to sen and environmental variable e.g.
export TEST=/usr/test
I tried this in python
cmd = "echo export VVG=/Users >> ~/.bash_profile"
os.system(cmd)
cmd = "source ~/.bash_profile"
os.system(cmd)
cmd = """echo $VVG"""
print os.system(cmd)
I saved to bash
restated bash
But....the echo $VVG did not work
How can I make it take?
Thanks
From python I need to sen and environmental variable e.g.
export TEST=/usr/test
I tried this in python
cmd = "echo export VVG=/Users >> ~/.bash_profile"
os.system(cmd)
cmd = "source ~/.bash_profile"
os.system(cmd)
cmd = """echo $VVG"""
print os.system(cmd)
I saved to bash
restated bash
But....the echo $VVG did not work
How can I make it take?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.