code
stringlengths
3
6.57k
load(plugin)
app.install(plugin)
server_names.get(server)
isinstance(server, basestring)
load(server)
isinstance(server, type)
server(host=host, port=port, **kargs)
isinstance(server, ServerAdapter)
ValueError("Unknown or unsupported server: %r" % server)
_stderr("Bottle v%s server starting up (using %s)
repr(server)
_stderr("Listening on http://%s:%d/\n" % (server.host, server.port)
_stderr("Hit Ctrl-C to quit.\n\n")
os.environ.get('BOTTLE_LOCKFILE')
FileCheckerThread(lockfile, interval)
server.run(app)
sys.exit(3)
server.run(app)
except (SystemExit, MemoryError)
getattr(server, 'quiet', quiet)
print_exc()
time.sleep(interval)
sys.exit(3)
FileCheckerThread(threading.Thread)
__init__(self, lockfile, interval)
threading.Thread.__init__(self)
run(self)
os.stat(p)
dict()
list(sys.modules.values()
getattr(module, '__file__', '')
in ('.pyo', '.pyc')
exists(path)
mtime(path)
exists(self.lockfile)
mtime(self.lockfile)
time.time()
thread.interrupt_main()
list(files.items()
exists(path)
mtime(path)
thread.interrupt_main()
time.sleep(self.interval)
__enter__(self)
self.start()
__exit__(self, exc_type, *_)
self.join()
issubclass(exc_type, KeyboardInterrupt)
TemplateError(HTTPError)
__init__(self, message)
HTTPError.__init__(self, 500, message)
BaseTemplate(object)
prepare()
render()
__init__(self, source=None, name=None, lookup=None, encoding='utf8', **settings)
parameter (str or buffer)
source.read()
hasattr(source, 'read')
hasattr(source, 'filename')
os.path.abspath(x)
self.settings.copy()
self.settings.update(settings)
self.search(self.name, self.lookup)
TemplateError('Template %s not found.' % repr(name)
TemplateError('No template specified.')
self.prepare(**self.settings)
search(cls, name, lookup=None)
depr('The template lookup path list should not be empty.', True)
os.path.isabs(name)
os.path.isfile(name)
depr('Absolute template path names are deprecated.', True)
os.path.abspath(name)
os.path.abspath(spath)
os.path.abspath(os.path.join(spath, name)
fname.startswith(spath)
os.path.isfile(fname)
os.path.isfile('%s.%s' % (fname, ext)
global_config(cls, key, *args)
cls.settings.copy()
prepare(self, **options)
preparations (parsing, caching, ...)
render(self, *args, **kwargs)
dictionaries (args)
keywords (kwargs)
MakoTemplate(BaseTemplate)
prepare(self, **options)
options.update({'input_encoding':self.encoding})
options.setdefault('format_exceptions', bool(DEBUG)
TemplateLookup(directories=self.lookup, **options)
Template(self.source, lookup=lookup, **options)
Template(uri=self.name, filename=self.filename, lookup=lookup, **options)
render(self, *args, **kwargs)
kwargs.update(dictarg)
self.defaults.copy()
_defaults.update(kwargs)
self.tpl.render(**_defaults)
CheetahTemplate(BaseTemplate)
prepare(self, **options)
threading.local()
Template(source=self.source, **options)