Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
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!"))
Ejemplo n.º 4
0
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!"))
Ejemplo n.º 5
0
def OnHelpEmail(win, event):
    common.webopen('mailto:%s' % email)
Ejemplo n.º 6
0
def OnHelpMaillist(win, event):
    common.webopen(maillist)
Ejemplo n.º 7
0
def OnHelpProject(win, event):
    common.webopen(homepage)
Ejemplo n.º 8
0
def OnWeb2pyProjectControllersWeb(win):
    
    global controller_function
    if controller_function:
        common.webopen("http://127.0.0.1:8000/%s" % controller_function)
    controllers_path = ''
Ejemplo n.º 9
0
 def OnDownload(self, event):
     common.webopen(self.homepage)
Ejemplo n.º 10
0
 def OnDownload(self, event):
     common.webopen(self.homepage)
Ejemplo n.º 11
0
def OnHelpMyBlog(win, event):
    common.webopen(blog)
Ejemplo n.º 12
0
def OnHelpEmail(win, event):
    common.webopen('mailto:%s' % email)
Ejemplo n.º 13
0
def OnHelpMaillist(win, event):
    common.webopen(maillist)
Ejemplo n.º 14
0
def OnHelpProject(win, event):
    common.webopen(homepage)
Ejemplo n.º 15
0
def OnHelpMyBlog(win, event):
    common.webopen(blog)
Ejemplo n.º 16
0
def OnHelpUlispot(win, event):
    common.webopen(ulispot)
Ejemplo n.º 17
0
def OnHelpUlispot(win, event):
    common.webopen(ulispot)