import os import sys import inspect def get_this_folder(): """Returns the folder of """ if __name__ == '__main__': #add trigger db library if needed this_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile(inspect.currentframe()))[0])) python_folder = this_folder if python_folder not in sys.path: sys.path.insert(0, python_folder) #import and start web site import ttdb_www #connection string provided if len(sys.argv) > 1: ttdb_www.app.config["SQL_CONNECTION_STRING"] = sys.argv[1] #trigger db run ttdb_www.app.run()