#!/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
# -*- coding: UTF-8 -*-

'''
$RCSfile: check_errors_wait.cgi,v $
$Revision: 834 $
$Author: j.torre $
$Date: 2008-04-17 19:59:49 +0200 (Do, 17. Apr 2008) $
The BioCASE TestingTool
'''

# ***** include the biocase.lib directory in the python sys path for importing *****
import os, sys
execfile( os.path.abspath(os.path.join(os.path.dirname( __file__ ), os.path.pardir, os.path.pardir, 'lib', 'biocase', 'adjustpath.py' ) ) )

#Import some stuff-----------------------------------------
import cgitb; cgitb.enable()
import string
import os, sys
import inspect as               _i
import os as                    _os
import os.path as               _p
import cgi
#-------------------------------------------------------------
import biocase.tools.templating
import biocase.configuration
import logging, biocase.initlogs
biocase.initlogs.initWebappLogging()

# get config data
cfg=biocase.configuration.Cfg()

#------------------------------------------------------------------------------------

#Get the dsa parameter
form = cgi.FieldStorage()


#Print the headers	
print 'Content-Type: text/html; charset=UTF-8'
print # Blank line marking end of HTTP headers

pm = biocase.tools.templating.PageMacro('Content', biocase.tools.templating.PageMacro.KEEPMODE)
pm.load('Content', os.path.join(cfg.wwwLocator,'testingtool', '_check_errors_wait.html'))

pm['dsa'] = form['dsa'].value
pm['search'] = form['search'].value
pm['debug'] = form['debug'].value


print pm