资 源 简 介
#!/usr/bin/env python# -*- coding: utf-8 -*-import webweb.config.debug = Falseurls = ( "/count", "count", "/reset", "reset")app = web.application(urls, locals())session = web.session.Session(app, web.session.DiskStore("sessions"), initializer={"count": 0})class count: def GET(self): session.count += 1 return str(session.count)class reset: def GET(self): session.kill() return ""if __name__ == "__main__": app.run()