WHY? Please remove this! this function is actually a line of code, no close required.
with open(filename, 'w') as f: f.write(content)