def create_file(path, resource): text = open_resourcefile(resource).read() f = open(path, 'w') f.write(text) f.close()
# -*- coding: utf-8 -*- from puddleobjects import PuddleConfig, get_icon from PyQt4.QtCore import * from PyQt4.QtGui import * import sys, pdb, resource,os from constants import CONFIGDIR, DATADIR import StringIO from util import open_resourcefile from puddlestuff.translations import translate __version__ = 29 files = [open_resourcefile(filename) for filename in [':/caseconversion.action', ':/standard.action']] SEPARATOR = 'separator' ALWAYS = 'always' menu_path = os.path.join(CONFIGDIR, 'menus') shortcut_path = os.path.join(CONFIGDIR, 'shortcuts') def create_file(path, resource): text = open_resourcefile(resource).read() f = open(path, 'w') f.write(text) f.close() def check_file(path, resource): if not os.path.exists(path): create_file(path, resource) else: cparser = PuddleConfig(path)
# -*- coding: utf-8 -*- from puddleobjects import PuddleConfig, get_icon from PyQt4.QtCore import * from PyQt4.QtGui import * import sys, pdb, resource, os from constants import CONFIGDIR, DATADIR import StringIO from util import open_resourcefile from puddlestuff.translations import translate __version__ = 29 files = [ open_resourcefile(filename) for filename in [':/caseconversion.action', ':/standard.action'] ] SEPARATOR = 'separator' ALWAYS = 'always' menu_path = os.path.join(CONFIGDIR, 'menus') shortcut_path = os.path.join(CONFIGDIR, 'shortcuts') def create_file(path, resource): text = open_resourcefile(resource).read() f = open(path, 'w') f.write(text) f.close() def check_file(path, resource):