import cherrypy from .web import Server from .imapplugin import ImapPlugin from .db import DBPoolManager from .types import Site def run(): db=DBPoolManager(cherrypy.engine) db.subscribe() site=Site(idbpool=db) imap=ImapPlugin( cherrypy.engine, dbpool=db, site=site ) imap.subscribe() server=Server(dbpool=db) cherrypy.quickstart(server) if __name__=="__main__": run()