#!/usr/bin/env python22 # -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 __all__ = ('Server',) import sys, os from os import path SCRIPTDIR = path.abspath(path.split(__file__)[0]) sys.path.insert(0, path.join(SCRIPTDIR, 'lib/python')) from ulib.web import web, Application, Page, defaults class Server(Application): def __init__(self, basedir=None, templatedir=None, host=None, port=None, debug=None): super(Server, self).__init__(basedir, templatedir, host, port, debug) def _new_session(self): pass # décommenter la ligne suivante pour activer les sessions #return web.session.DiskStore('sessions'), {} class index(Page): PREFIX = r'/' if __name__ == '__main__': Server(SCRIPTDIR).run(sys.argv[1:])