#!c:\Program Files\Python39\python.exe # -*- coding: Latin-1 -*- # ***** include the biocase.lib directory in the python sys path for importing ***** import os exec(open(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir, os.path.pardir, 'lib', 'biocase', 'adjustpath.py'))).read()) import cgitb; cgitb.enable() import cgi import biocase.configuration from biocase.tools.templating import PageMacro cfg = biocase.configuration.Cfg() # read template tmpl = PageMacro('Content', PageMacro.DELMODE) tmpl.load('Content', os.path.join(cfg.wwwLocator,'utilities','queryforms','_qf_spice.html') ) # get wrapper url form = biocase.configuration.sanitiseFieldStorage(cgi.FieldStorage()) if 'url' in form: wrapper_url = form.getfirst('url') else: raise "No wrapper URL found!" # fill template with url tmpl['wrapper_url']=wrapper_url # # print HTML # print('Content-Type: text/html; charset=utf-8\n\n') print(str(tmpl))