global settingsfile
at first only read mode
This commit is contained in:
parent
ed571c48c3
commit
887b62137f
15
settings.py
Executable file
15
settings.py
Executable file
|
@ -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
|
Loading…
Reference in a new issue