From 887b62137ff24f7734cd332fdaf1ea3408a90bed Mon Sep 17 00:00:00 2001 From: "Marcus \"Chaosblog" Date: Tue, 24 Jan 2012 22:12:57 +0100 Subject: [PATCH] global settingsfile at first only read mode --- settings.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 settings.py diff --git a/settings.py b/settings.py new file mode 100755 index 0000000..484198e --- /dev/null +++ b/settings.py @@ -0,0 +1,15 @@ +#!/usr/bin/python +import ConfigParser, os + +def load_settings(): + configfile = ConfigParser.ConfigParser() + configfile.read('settings.cfg') + config=dict() + config['mail']=configfile.get("general","mail") + config['start_date']=configfile.get("general","start_date") + + config['username']=configfile.get("blogsettings","username") + config['xmlrpc_endpoint']=configfile.get("blogsettings","xmlrpc_endpoint") + config['blog_id']=configfile.get("blogsettings","blog_id") + config['participants_page_id']=configfile.get("blogsettings","participants_page_id") + return config \ No newline at end of file