parameters: (filename, updated)
docstring: If the file is different to updated then copy updated
      into the file else leave alone so CVS and make don't treat
      it as modified.
docstring_summary: If the file is different to updated then copy updated
      into the file else leave alone so CVS and make don't treat
      it as modified.
docstring_tokens: If the file is different to updated then copy updated into the file else leave alone so CVS and make don t treat it as modified .
function: def UpdateFile(filename, updated):
      """ If the file is different to updated then copy updated
      into the file else leave alone so CVS and make don't treat
      it as modified. """
      try:
          infile = open(filename, "rb")
      except IOError:	# File is not there yet
          out = open(filename, "wb")
          out.write(updated.encode('utf-8'))
          out.close()
          print("New %s" % filename)
          return
      original = infile.read()
      infile.close()
      original = original.decode('utf-8')
      if updated != original:
          os.unlink(filename)
          out = open(filename, "wb")
          out.write(updated.encode('utf-8'))
          out.close()
          print("Changed %s " % filename)
function_tokens: def UpdateFile ( filename , updated ) : try : infile = open ( filename , "rb" ) except IOError : # File is not there yet out = open ( filename , "wb" ) out . write ( updated . encode ( 'utf-8' ) ) out . close ( ) print ( "New %s" % filename ) return original = infile . read ( ) infile . close ( ) original = original . decode ( 'utf-8' ) if updated != original : os . unlink ( filename ) out = open ( filename , "wb" ) out . write ( updated . encode ( 'utf-8' ) ) out . close ( ) print ( "Changed %s " % filename )