I'm using ConfigParser in Python
config.ini is
[general]
name: my_name
base_dir: /home/myhome/exp
exe_dir: ${base_dir}/bin
Here I want exp_dir
becomes /home/myhome/exp/bin
not ${base_dir}/bin
.
It means ${base_dir}
would be substituted to /home/myhome/exp automatically
.
You can use ConfigParser interpolation
Your example becomes: