source: orange-bioinformatics/obiKEGG2/conf.py @ 1541:efd40e75bc7d

Revision 1541:efd40e75bc7d, 679 bytes checked in by ales_erjavec, 2 years ago (diff)

Added optional suds.transport.Transport subclass using requests package.

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 = requests
21
22"""
23
24#_defaults_env = dict(default)
25#_defaults_env.update(dict(os.environ))
26
27parser = ConfigParser.ConfigParser(dict(os.environ))#_defaults_env)
28# TODO: global settings
29
30parser.readfp(StringIO(default), "default")
31
32parser.read([os.path.expanduser("~/.obiKEGG/rc.cfg")])
33
34params = {}
35
36
37for section in parser.sections():
38    for option in parser.options(section):
39        params[section + "." + option] = parser.get(section, option)
Note: See TracBrowser for help on using the repository browser.