source: orange-bioinformatics/obiKEGG2/conf.py @ 1547:1420f13cba63

Revision 1547:1420f13cba63, 701 bytes checked in by ales_erjavec, 2 years ago (diff)

Changed default configuration.

Line 
1"""
2obiKEGG2 configuration
3
4mostly just caching settings
5
6"""
7
8import os
9import ConfigParser
10from StringIO import StringIO
11
12
13default = """
14[cache]
15path = %(home)s/.obiKEGG/
16store = sqlite3
17kegg_invalidate = always
18
19[service]
20transport = urllib2
21# transport = requests
22
23"""
24
25#_defaults_env = dict(default)
26#_defaults_env.update(dict(os.environ))
27
28parser = ConfigParser.ConfigParser(dict(os.environ))#_defaults_env)
29# TODO: global settings
30
31parser.readfp(StringIO(default), "default")
32
33parser.read([os.path.expanduser("~/.obiKEGG/rc.cfg")])
34
35params = {}
36
37
38for section in parser.sections():
39    for option in parser.options(section):
40        params[section + "." + option] = parser.get(section, option)
Note: See TracBrowser for help on using the repository browser.