def __directory(globs, request, **kw): match = request.match if match is None: raise IOError(path) name = match.get('name') if name is None or name.startswith('.'): raise IOError(path) filename = os.path.join(path, name) return response(filename)
def __file(*args, **kw): return response(name)