11
|
1 #!/usr/bin/env python |
|
2 |
|
3 """ supplys the data needed to comunicate with the roundup-server, |
|
4 and the sqlite database. Represents the types of errors used in roundup. |
|
5 |
|
6 author: Sascha L. Teichmann <sascha.teichmann@intevation.de> |
|
7 author: Bernhard Reiter <bernhard@intevation.de> |
|
8 author: Sean Engelhardt <sean.engelhardt@intevation.de> |
|
9 |
|
10 (c) 2010,2015 by Intevation GmbH |
|
11 |
|
12 This is Free Software unter the terms of the |
|
13 GNU GENERAL PUBLIC LICENSE Version 3 or later. |
|
14 See http://www.gnu.org/licenses/gpl-3.0.txt for details |
|
15 """ |
|
16 |
12
|
17 # import re |
|
18 # import , os |
11
|
19 |
12
|
20 import importlib |
|
21 |
|
22 # from roundup_cc import * |
|
23 |
|
24 # PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) |
|
25 |
|
26 def make_chart(chart_data_file): |
|
27 |
|
28 mod = importlib.import_module("roundup_cc." + chart_data_file) |
|
29 return mod.get_chart() |
|
30 |
|
31 # test = exec(open(PATH + "/" + chart_data_file+'.py').read()) |
|
32 |
|
33 # print(test) |
|
34 # html = eval(chart_data_file+".py") |
|
35 # return html |
|
36 # fp = open(chart_data_file) |
|
37 # contents = fp.read() |
|
38 |
|
39 # return exec(chart_data_file.get_chart() |
|
40 |
|
41 # def get_tech_intern_chart(): |
|
42 # return display.render_db_stats_as_html(rcd.DATABASE_TECH_INTERN, rcd.SELECT_ALL) |