I have a text file /etc/default/foo which contains one line:
/etc/default/foo
FOO=\"/path/to/foo\"
In my python script, I need to reference the
Same answer as @jil however, that answer is specific to some historical version of Python.
In modern Python (3.x):
exec(open('filename').read())
replaces execfile('filename') from 2.x
execfile('filename')