#!c:\Program Files\Python39\python.exe
# -*- coding: Latin-1 -*-
# ***** include the biocase.lib directory in the python sys path for importing *****
import os, sys
exec(open(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir, 'lib', 'biocase', 'adjustpath.py'))).read())
import cgitb; cgitb.enable()
import string, inspect
print('Content-Type: text/html')
print() # Blank line marking end of HTTP headers
print('''
Webserver ENVIRONMENT
''')
vars = {}
vars['os.getcwd()'] = os.getcwd()
vars['__file__'] = str(__file__)
vars['os.path.dirname( __file__ )'] = os.path.dirname( __file__ )
vars['os.path.abspath( __file__ )'] = os.path.abspath( __file__ )
vars['inspect.getfile( lambda:None )'] = inspect.getfile( lambda:None )
vars['os.path.abspath( inspect.getfile( lambda:None ) )'] = os.path.abspath( inspect.getfile( lambda:None ) )
vars['Python Sys Path'] = str(sys.path)
try:
from biocase.wrapper.static_functions import getAbsoluteCWDirectory
vars['biocase.wrapper.functions.getAbsoluteCWDirectory()'] = getAbsoluteCWDirectory()
except:
vars['biocase.wrapper.functions.getAbsoluteCWDirectory()'] = 'PyWrapper libraries not installed !'
print('''
Assorted Python variables
Variable |
Value |
''')
for k in vars:
print("%s | %s |
" %(k, vars[k]))
print('''
Webserver Environment
Variable |
Value |
''')
envkeys = list(os.environ.keys())
envkeys.sort()
for k in envkeys:
print("%s | %s |
" %(k, os.environ[k]))
print('''
''')