code: def extract_dirs(mod, path, dst, verbose=False, exclude=None, exclude_ext=None, recursion=True, replace=True):
      
      default_exclude = ['.svn', '_svn', '.git']
      default_exclude_ext = ['.pyc', '.pyo', '.bak', '.tmp']
      exclude = exclude or []
      exclude_ext = exclude_ext or []
  #    log = logging.getLogger('uliweb')
      if not os.path.exists(dst):
          os.makedirs(dst)
          if verbose:
              print 'Make directory %s' % dst
      for r in pkg.resource_listdir(mod, path):
          if r in exclude or r in default_exclude:
              continue
          fpath = os.path.join(path, r)
          if pkg.resource_isdir(mod, fpath):
              if recursion:
                  extract_dirs(mod, fpath, os.path.join(dst, r), verbose, exclude, exclude_ext, recursion, replace)
          else:
              ext = os.path.splitext(fpath)[1]
              if ext in exclude_ext or ext in default_exclude_ext:
                  continue
              extract_file(mod, fpath, dst, verbose, replace)
docs: mod name
      path mod path
      dst output directory
      resursion True will extract all sub module of mod