I have a config file for a python script that stores multiple different values
my config.ini looks like this:
[DHR]
key1 = "\\path1\..."
key2 = "\\path2\..."
key3 = "\\path3\file-{today}.xlsx"
my .py has a date variable that gets today's date like:
today = str(date.today().strftime('%y%m%d'))
However when I read the .ini file the variable does not get appended to the value as I expected.
print(config.read("config.ini"))
"\\path3\file-{today}.xlsx"
How can I adjust my script to append the variable to the path so that it looks like this:
"\\path3\file-240709.xlsx"
key3.format(today=today)orkey3.format(**globals()).