remoting/host/installer/build-installer-archive.py
def copyFileWithDefs(src_file, dst_file, defs):
  """Copies from src_file to dst_file, performing variable substitution.

  Any @@VARIABLE@@ in the source is replaced with the value of VARIABLE
  in the |defs| dictionary when written to the destination file.

  Args:
    src_file: Full or relative path to source file to copy.
    dst_file: Relative path (and filename) where src_file should be copied.
    defs: Dictionary of variable definitions.
  """
  data = open(src_file, 'r').read()
  for key, val in defs.items():
    try:
      data = data.replace('@@' + key + '@@', val)
    except TypeError:
      print(repr(key), repr(val))
  open(dst_file, 'w').write(data)
  shutil.copystat(src_file, dst_file)
Copies from src_file to dst_file, performing variable substitution.

  Any @@VARIABLE@@ in the source is replaced with the value of VARIABLE
  in the |defs| dictionary when written to the destination file.

  Args:
    src_file: Full or relative path to source file to copy.
    dst_file: Relative path (and filename) where src_file should be copied.
    defs: Dictionary of variable definitions.
  
Copies from src_file to dst_file, performing variable substitution.
Any @@VARIABLE@@ in the source is replaced with the value of VARIABLE
in the |defs| dictionary when written to the destination file.
Copies from src_file to dst_file performing variable substitution . Any @@VARIABLE@@ in the source is replaced with the value of VARIABLE in the |defs| dictionary when written to the destination file .
def copyFileWithDefs(src_file, dst_file, defs):
  data = open(src_file, 'r').read()
  for key, val in defs.items():
    try:
      data = data.replace('@@' + key + '@@', val)
    except TypeError:
      print(repr(key), repr(val))
  open(dst_file, 'w').write(data)
  shutil.copystat(src_file, dst_file)
def copyFileWithDefs ( src_file , dst_file , defs ) : data = open ( src_file , 'r' ) . read ( ) for key , val in defs . items ( ) : try : data = data . replace ( '@@' + key + '@@' , val ) except TypeError : print ( repr ( key ) , repr ( val ) ) open ( dst_file , 'w' ) . write ( data ) shutil . copystat ( src_file , dst_file )
Copies from src_file to dst_file, performing variable substitution.
Copies from src_file to dst_file performing variable substitution .
"""Copies from src_file to dst_file, performing variable substitution.

  Any @@VARIABLE@@ in the source is replaced with the value of VARIABLE
  in the |defs| dictionary when written to the destination file.

  Args:
    src_file: Full or relative path to source file to copy.
    dst_file: Relative path (and filename) where src_file should be copied.
    defs: Dictionary of variable definitions.
  """
src_file
Full or relative path to source file to copy.
Full or relative path to source file to copy .
dst_file
Relative path (and filename) where src_file should be copied.
Relative path ( and filename ) where src_file should be copied .
defs
Dictionary of variable definitions.
Dictionary of variable definitions .