def OnHelpIndex(win, event): lang = 'en' if Globals.app.i18n.lang: lang = Globals.app.i18n.lang filename = common.get_app_filename(win, 'doc/%s/index.htm' % lang) if not os.path.exists(filename): filename = common.get_app_filename(win, 'doc/%s/index.htm' % 'en') common.webopen(filename)
def show_modules_info(win): files = glob.glob(os.path.join(win.workpath, 'plugins/*/*.pin')) plugins = [] for f in files: key = os.path.basename(os.path.dirname(f)) x = dict4ini.DictIni(f) tr_color = '#CCFFFF' platform = x.info.get('platform', '') platform = platform.upper() p = { 'name': key, 'desc': x.info.get('description', ''), 'homepage': x.info.get('homepage', ''), 'author': x.info.get('author', ''), 'date': x.info.get('date', ''), 'platform': platform, 'version': x.info.get('version', ''), 'tr_color': tr_color } plugins.append(p) m = [] for j, k in enumerate(x.modules.values()): i = x.get(k) if j % 2: t_color = '#FFFFFF' else: t_color = '#66FF00' m.append({ 'name': x[k].get('name', ''), 'homepage': x[k].get('homepage', ''), 'download': x[k].get('download', ''), 'description': x[k].get('description', ''), 'version': x[k].get('version', ''), 't_color': t_color }) p['modules'] = m from modules.meteor import Template template = Template() import T_modulesinfo template.load(T_modulesinfo, 'python') f = os.path.join(win.app.userpath, 'modulesinfo.html') try: fout = file(f, "w") fout.write(template.value('html', {'body': plugins})) fout.close() common.webopen(f) except: error.traceback() common.showerror(win, tr("Output modules information error!"))
def show_modules_info(win): files = glob.glob(os.path.join(win.workpath, 'plugins/*/*.pin')) plugins = [] for f in files: key = os.path.basename(os.path.dirname(f)) x = dict4ini.DictIni(f) tr_color = '#CCFFFF' platform = x.info.get('platform', '') platform = platform.upper() p = {'name':key, 'desc':x.info.get('description', ''), 'homepage':x.info.get('homepage', ''), 'author':x.info.get('author', ''), 'date':x.info.get('date', ''), 'platform':platform, 'version':x.info.get('version', ''), 'tr_color':tr_color} plugins.append(p) m = [] for j, k in enumerate(x.modules.values()): i = x.get(k) if j % 2: t_color = '#FFFFFF' else: t_color = '#66FF00' m.append({'name':x[k].get('name', ''), 'homepage':x[k].get('homepage', ''), 'download':x[k].get('download', ''), 'description':x[k].get('description', ''), 'version':x[k].get('version', ''), 't_color':t_color}) p['modules'] = m from modules.meteor import Template template = Template() import T_modulesinfo template.load(T_modulesinfo, 'python') f = os.path.join(win.app.userpath, 'modulesinfo.html') try: fout = file(f, "w") fout.write(template.value('html', {'body':plugins})) fout.close() common.webopen(f) except: error.traceback() common.showerror(win, tr("Output modules information error!"))
def OnHelpEmail(win, event): common.webopen('mailto:%s' % email)
def OnHelpMaillist(win, event): common.webopen(maillist)
def OnHelpProject(win, event): common.webopen(homepage)
def OnWeb2pyProjectControllersWeb(win): global controller_function if controller_function: common.webopen("http://127.0.0.1:8000/%s" % controller_function) controllers_path = ''
def OnDownload(self, event): common.webopen(self.homepage)
def OnHelpMyBlog(win, event): common.webopen(blog)
def OnHelpUlispot(win, event): common.webopen(ulispot)