Пример #1
0
for mod in modules:
    weaver = config_parser.getboolean(mod, "weaver")
    static = config_parser.getboolean(mod, "static")
    ajax = config_parser.getboolean(mod, "ajax")

    if weaver:
        host = config_parser.get(mod, "host")
        port = config_parser.getint(mod, "port")
        conf = config_parser.get(mod, "conf")
        wc = wclient.Client(host, port, conf)
    else:
        wc = None

    if static:
        title = config_parser.get_with_defaults(mod, "title", None)
        path = config_parser.get(mod, "path")
    else:
        title = None
        path = None

    if ajax:
        ajax_path = config_parser.get_with_defaults(mod, "ajax_path", config_parser.get(mod, "ajax_path"))
        print "mod=%s ajax_path=%s path=%s" % (mod, ajax_path, path)
    else:
        ajax_path = None

    if config_parser.getboolean(mod, "mod_file"):
        get_page_module = import_module(mod).get_page_module
        Module = get_page_module(PageModule)
    else: