parameters: (api, src, dst, product_list)
docstring: Copy listed files src to dst.
docstring_summary: Copy listed files src to dst.
docstring_tokens: Copy listed files src to dst .
function: def copy_listed_files(api, src, dst, product_list):
    """Copy listed files src to dst."""
    api.python.inline(
        name='copy build products',
        program='''import errno
  import glob
  import os
  import shutil
  import sys
  
  src = sys.argv[1]
  dst = sys.argv[2]
  build_products = %s
  
  try:
    os.makedirs(dst)
  except OSError as e:
    if e.errno != errno.EEXIST:
      raise
  
  for pattern in build_products:
    path = os.path.join(src, pattern)
    for f in glob.glob(path):
      dst_path = os.path.join(dst, os.path.relpath(f, src))
      if not os.path.isdir(os.path.dirname(dst_path)):
        os.makedirs(os.path.dirname(dst_path))
      print('Copying build product %%s to %%s' %% (f, dst_path))
      shutil.move(f, dst_path)
  ''' % str(product_list),
        args=[src, dst],
        infra_step=True)
function_tokens: def copy_listed_files ( api , src , dst , product_list ) : api . python . inline ( name = 'copy build products' , program = '''import errno
  import glob
  import os
  import shutil
  import sys
  
  src = sys.argv[1]
  dst = sys.argv[2]
  build_products = %s
  
  try:
    os.makedirs(dst)
  except OSError as e:
    if e.errno != errno.EEXIST:
      raise
  
  for pattern in build_products:
    path = os.path.join(src, pattern)
    for f in glob.glob(path):
      dst_path = os.path.join(dst, os.path.relpath(f, src))
      if not os.path.isdir(os.path.dirname(dst_path)):
        os.makedirs(os.path.dirname(dst_path))
      print('Copying build product %%s to %%s' %% (f, dst_path))
      shutil.move(f, dst_path)
  ''' % str ( product_list ) , args = [ src , dst ] , infra_step = True )