def get_widget(self): try: for fname in os.listdir("widget"): if fname[-3:] in ["ini"]: cfg = o_cfg("widget/%s" % fname) self.widgets[fname[:-4]] = cfg except: logger.write(sys.exc_value, "ERROR", (self, traceback.extract_stack()))
def CreateProject(self, name, path, open, main): projects = o_cfg("publics\projects.ini") config = projects config[name] = {} config[name]['main'] = main config[name]['lang'] = "python" config[name]['hidden'] = "False" config[name]['path'] = path config.write()
# styled text using wxPython's # wx.StyledTextCtrl(parent, id, pos, size, style, name) # set up for folding and Python code highlighting # source: Dietrich 16NOV2008 import wx import os import sys import wx.stc import keyword import traceback from globals.obj_cfg import o_cfg from globals import * syntax = o_cfg("publics\syntax.ini") shortcuts = o_cfg("publics\shortcuts.ini") if wx.Platform == '__WXMSW__': # for windows OS faces = syntax["Windows"] else: faces = syntax["Other"] EXT2LAN = { ".py" : "Python", ".xrc" : "XRC", ".xgt" : "XML" }
def get_projects(self): projects = o_cfg("publics/projects.ini") return projects
# To change this template, choose Tools | Templates # and open the template in the editor. __author__="Giuseppe Tripoli" __date__ ="$18-mar-2012 23.55.05$" __all__ = ["Directory"] from globals.obj_cfg import o_cfg cfg = o_cfg("publics\config.ini") Directory = {} for section in cfg : vars()["%s" % (section)]=cfg[section]