Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1b777baee0
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (22 sloc) 0.516 kb
'''
Created on 17.02.2012
@author: flocki
'''
import json
def set(parameter, value):
config = get(None)
config[parameter] = value
with open('config.json', 'w') as fp:
json.dump(config, fp)
def get(parameter):
try:
with open('config.json', 'r') as fp:
config = json.load(fp)
except:
config = dict()
if parameter is None:
return config
if parameter in config:
return config.get(parameter)
else:
config[parameter] = None
Jump to Line
Something went wrong with that request. Please try again.