def command_copytree(args):
 for srcdir in args.srcdirs:
  basename = os.path.basename(srcdir)
  destdir2 = os.path.normpath(os.path.join(args.destdir, basename))
  if os.path.exists(destdir2):
   shutil.rmtree(destdir2)
  sys.stdout.write(('copytree: %s => %s\n' % (srcdir, destdir2)))
  shutil.copytree(srcdir, destdir2)
 return 0

def command_copytree ( args ) : for srcdir in args . srcdirs : basename = os . path . basename ( srcdir ) destdir2 = os . path . normpath ( os . path . join ( args . destdir , basename ) ) if os . path . exists ( destdir2 ) : shutil . rmtree ( destdir2 ) sys . stdout . write ( ( 'copytree: %s => %s\n' % ( srcdir , destdir2 ) ) ) shutil . copytree ( srcdir , destdir2 ) return 0
copy one or more source directory(s) below a destination directory .