def openWiki(name): global wiki if isinstance(name, Wiki): wiki = name return if not name: name = settings.conf['general']['default'] if name in settings.conf: wiki = Wiki.fromName(name) else: wiki = Wiki.fromApiUrl(name)
def _select(self, lang): url, name = page.langlinks[lang] openWiki(Wiki.fromPageUrl(url)) openPage(name)
def _select(self, name): if name == "Main page": name = '' url = dict(page.iwlinks)[name] openWiki(Wiki.fromPageUrl(url)) openPage(name)