jade.utils.utils.modify_file

jade.utils.utils.modify_file(filename, line_func, *args, **kwargs)[source]

Modifies a file by running a function on each line.

Parameters:
  • filename (str)

  • line_func (callable) – Should return the line to write to the modified file.