I'm looking for a way to source a bash file and get some variables defined within to appear within my python environment. Something like...
Code:
#!/usr/bin/python
import os
os.exec('source foo.sh')
env = os.environ
for i in env:
print i + "\n",
Any ideas?