I am trying to write a piece of python code which will write a piece of CMake code ...
But when I get to the following phase:
def_desc = "blaa"
s = " FILE(WRITE ${CONFIG_H} \"/* {0} */\\n\")\n".format(def_desc)
then python yells at me:
Traceback (most recent call last):
File "/home/ferencd/tmp/blaa.py", line 2, in <module>
s = " FILE(WRITE ${CONFIG_H} \"/* {0} */\\n\")\n".format(def_desc)
KeyError: 'CONFIG_H'
[Finished in 0.0s with exit code 1]
I understood that somehow the interpreter thinks that {CONFIG_H}
is supposed to mean a parameter from the parameter list of format
... but no, I'd really like to print out that into the output ... as it is.
How can I deal with this situation?