sean@11: #!/usr/bin/env python sean@11: sean@11: """ supplys the data needed to comunicate with the roundup-server, sean@11: and the sqlite database. Represents the types of errors used in roundup. sean@11: sean@11: author: Sascha L. Teichmann sean@11: author: Bernhard Reiter sean@11: author: Sean Engelhardt sean@11: sean@11: (c) 2010,2015 by Intevation GmbH sean@11: sean@11: This is Free Software unter the terms of the sean@11: GNU GENERAL PUBLIC LICENSE Version 3 or later. sean@11: See http://www.gnu.org/licenses/gpl-3.0.txt for details sean@11: """ sean@11: sean@12: # import re sean@12: # import , os sean@11: sean@12: import importlib sean@12: sean@12: # from roundup_cc import * sean@12: sean@12: # PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) sean@12: sean@13: def make_chart(chart_data_file, target_div_name): sean@13: mod = importlib.import_module("roundup_cc." + chart_data_file) sean@12: sean@13: return mod.get_chart(target_div_name) sean@12: sean@12: # test = exec(open(PATH + "/" + chart_data_file+'.py').read()) sean@12: sean@12: # print(test) sean@12: # html = eval(chart_data_file+".py") sean@12: # return html sean@12: # fp = open(chart_data_file) sean@12: # contents = fp.read() sean@12: sean@12: # return exec(chart_data_file.get_chart() sean@12: sean@12: # def get_tech_intern_chart(): sean@12: # return display.render_db_stats_as_html(rcd.DATABASE_TECH_INTERN, rcd.SELECT_ALL)