bad copy paste job from one of my old projects whoops
This commit is contained in:
parent
7149d9f39d
commit
90b37d6861
1 changed files with 0 additions and 15 deletions
15
functions.py
15
functions.py
|
@ -21,18 +21,3 @@ def msgBox(title, text, form = Gtk.MessageType.WARNING):
|
||||||
|
|
||||||
def rmatch(pattern, string):
|
def rmatch(pattern, string):
|
||||||
return re.match(pattern, string) != None
|
return re.match(pattern, string) != None
|
||||||
|
|
||||||
def readSettings():
|
|
||||||
global settings
|
|
||||||
if not path.isfile(settingsLocation + "config.json"):
|
|
||||||
os.makedirs(settingsLocation, 0o755)
|
|
||||||
open(settingsLocation + "config.dat", 'x')
|
|
||||||
try:
|
|
||||||
settings = pickle.load(open(settingsLocation + "config.dat", 'rb'))
|
|
||||||
except:
|
|
||||||
MsgBox("Error", "Failed to load settings. The default settings will be used instead.")
|
|
||||||
settings = {"setting":"value", "save database": True} #indent me when releasing!
|
|
||||||
|
|
||||||
def writeSettings():
|
|
||||||
global settings
|
|
||||||
pickle.dump(settings, open(settingsLocation + "config.dat", 'wb'))
|
|
||||||
|
|
Loading…
Reference in a new issue