Generate config file from template using Python search and replace.

Mr Zaug matthew.herzog at gmail.com
Tue Dec 1 13:43:18 EST 2015


Ye, this does work. Many thanks!

filename = "{NNN}_{BRAND}_farm.any".format(BRAND=brand, NNN=nnn)
with open(filename, "w") as outstream:
    outstream.write(data)



More information about the Python-list mailing list