Lines Matching refs:filename
153 application, filename = self.find_application(environ)
163 if filename is None:
177 % filename)
181 % (filename, self.directory))
202 filename = self.find_file(environ, index_name)
203 if filename:
207 filename = None
209 filename = self.find_file(environ, name)
210 if filename is None:
211 return None, filename
213 return self.get_application(environ, filename), filename
240 for filename in os.listdir(self.directory):
241 base, ext = os.path.splitext(filename)
242 full_filename = os.path.join(self.directory, filename)
246 if filename == base_filename:
272 def get_application(self, environ, filename): argument
273 if os.path.isdir(filename):
276 t = os.path.splitext(filename)[1]
282 app = constructor(self, environ, filename)
330 filename = os.path.join(self.directory, '__init__.py')
331 if not os.path.exists(filename):
333 return load_module(environ, filename)
342 def make_directory(parser, environ, filename): argument
345 base_python_name += "." + os.path.basename(filename)
347 base_python_name = os.path.basename(filename)
348 return parser.get_parser(filename, base_python_name)
352 def make_unknown(parser, environ, filename): argument
353 return fileapp.FileApp(filename)
357 def load_module(environ, filename): argument
359 module_name = os.path.splitext(os.path.basename(filename))[0]
362 return load_module_from_name(environ, filename, module_name,
365 def load_module_from_name(environ, filename, module_name, errors): argument
368 init_filename = os.path.join(os.path.dirname(filename), '__init__.py')
375 % (os.path.dirname(filename), e))
385 parent = load_module_from_name(environ, os.path.dirname(filename),
392 base_name, [os.path.dirname(filename)])
399 def make_py(parser, environ, filename): argument
400 module = load_module(environ, filename)
445 filename = 'index.html'
447 filename = request.path_info_pop(environ)
448 full = self.normpath(os.path.join(self.directory, filename))
477 def make_app(self, filename): argument
478 return fileapp.FileApp(filename)
553 filename = 'index.html'
555 filename = request.path_info_pop(environ)
557 self.resource_name + '/' + filename))