old_contents: import glob
  import shutil
  import os
  
  def move_glob(src,dst):
      """Moves files from src to dest.
  
      src may be any glob to recognize files. dst must be a folder."""
      for obj in glob.iglob(src):
          shutil.move(obj,dst)
  
  def copy_glob(src,dst):
      """Copies files from src to dest.
  
      src may be any glob to recognize files. dst must be a folder."""
      for obj in glob.iglob(src):
          if os.path.isdir(obj):
              start_part=os.path.commonpath([src,obj])
              end_part=os.path.relpath(obj,start_part)
              shutil.copytree(obj,os.path.join(dst,end_part))
          else:
              shutil.copy2(obj,dst)
  
  
  
new_contents: import glob
  import shutil
  import os
  
  if os.name == "nt":
      from .ntcommonpath import commonpath
  else:
      from .posixcommonpath import commonpath
  
  def move_glob(src,dst):
      """Moves files from src to dest.
  
      src may be any glob to recognize files. dst must be a folder."""
      for obj in glob.iglob(src):
          shutil.move(obj,dst)
  
  def copy_glob(src,dst):
      """Copies files from src to dest.
  
      src may be any glob to recognize files. dst must be a folder."""
      for obj in glob.iglob(src):
          if os.path.isdir(obj):
              start_part=commonpath([src,obj])
              end_part=os.path.relpath(obj,start_part)
              shutil.copytree(obj,os.path.join(dst,end_part))
          else:
              shutil.copy2(obj,dst)
  
  
  
subject: Use backported commonpath instead of built in os.path.commonpath