Lines Matching full:contents
60 def subst_template(contents, values):
74 contents = contents.replace('@' + key + '@', val)
77 return contents
82 Returns the contents of the specified file_name with substited
91 def write_if_changed(file_name, contents):
93 Writes the specified contents to the specified file_name
94 iff the contents are different than the current contents.
101 if contents == old_contents:
104 open(file_name, 'w').write(contents)
174 contents = subst_template(template, values)
176 contents = subst_file(in_file, values)
179 contents = """MAJOR=%(MAJOR)s
189 write_if_changed(out_file, contents)
191 print contents