'Return a list of paths to search for plugins in'

def _get_paths(self, subdirs=True):

    if (self._paths is not None):
        return self._paths
    ret = self._extra_dirs[:]
    if (self.config is not None):
        for path in self.config:
            path = os.path.realpath(os.path.expanduser(path))
            if subdirs:
                contents = (glob.glob(('%s/*' % path)) + glob.glob(('%s/*/*' % path)))
                for c in contents:
                    if (os.path.isdir(c) and (c not in ret)):
                        ret.append(c)
            if (path not in ret):
                ret.append(path)
    ret.extend(self._get_package_paths(subdirs=subdirs))
    reordered_paths = []
    win_dirs = []
    for path in ret:
        if path.endswith('windows'):
            win_dirs.append(path)
        else:
            reordered_paths.append(path)
    reordered_paths.extend(win_dirs)
    self._paths = reordered_paths
    return reordered_paths
