code: def _visit_pyfiles(list, dirname, names):
      
      # get extension for python source files
      if not globals().has_key('_py_ext'):
          global _py_ext
  #        _py_ext = [triple[0] for triple in imp.get_suffixes()
  #                   if triple[2] == imp.PY_SOURCE][0]
          _py_ext = [triple[0] for triple in imp.get_suffixes()
                     if triple[2] == imp.PY_SOURCE]
          
      # don't recurse into CVS directories
      if 'CVS' in names:
          names.remove('CVS')
  
      if '.svn' in names:
          names.remove('.svn')
  
      if '.git' in names:
          names.remove('.git')
  
      if 'static' in names:
          names.remove('static')
      
      # add all *.py files to list
      list.extend(
          [os.path.join(dirname, file) for file in names
           if os.path.splitext(file)[1] in _py_ext]
          )
docs: Helper for getFilesForName().