def _walktree_compat(self, top):
        '''
           recursively descend the directory tree rooted at top.
           Return all of the directories as a list. This should work
           on python2.2
        '''

        dirlist = []
        templist = []
        try:
            templist = os.listdir(top)
        except OSError, err:
            import errno
            if err.errno == errno.ENOENT:
                return []

        for f in templist:
            pathname = os.path.join(top, f)
            try:
                mode = os.stat(pathname)[ST_MODE]
            except OSError, err:
                import errno
                if err.errno == errno.ENOENT:
                    continue
            if S_ISDIR(mode):
                # It's a directory, recurse into it
                dirlist.append(pathname)
                dirlist.extend(self._walktree_compat(pathname))
        return dirlist

           recursively descend the directory tree rooted at top.
           Return all of the directories as a list. This should work
           on python2.2
        
recipes/Python/259147_FSList/recipe-259147.py