#!C:\Python25\python.exe # -*- coding: UTF-8 -*- import os, sys, Cookie, hashlib, subprocess import cgitb,cgi from xml.dom.minidom import Document import xml.dom.minidom from xml.dom.minidom import Node import xml.sax import pprint #cgitb.enable() # ***** include the biocase.lib directory in the python sys path for importing ***** execfile( os.path.abspath( os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, 'lib', 'biocase', 'adjustpath.py' ) )) execfile( os.path.abspath( os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, 'lib', 'biocase', 'appinit.py' ) )) from biocase.configtool.general import * import biocase.configuration archivefilename = form.getvalue('archivefilename') dsa = form.getvalue('dsa') archivePath = os.path.abspath(".." + os.sep + ".." + os.sep + "archive") + os.sep + dsa + os.sep log = archivePath + archivefilename + ".log" if dsa is None: execfile( os.path.abspath( os.path.join( os.path.dirname( __file__ ), 'main.cgi' ) )) sys.exit() # check authentication! authorize(form, dsa=dsa) print('Content-Type: text/plain; charset=UTF-8\n') f = open(log, "r") print f.read() f.close()