import time
#import cgitb; cgitb.enable()
import cgi
import html
import os
import sys
import platform
import importlib
import wasd
def CGIorCGIplus():
"Basic function that can be used in standard CGI or CGIplus mode!"
print ("""Content-Type: text/html
pyRTE_test2.py
pyRTE_test2.py
""")
print ('RTE
')
print ('')
print ('- Python:' + platform.sys.version)
print ('
- rte_id:' + wasd.rte_id())
print ('
- usage_rte:' + str(wasd.usage_rte()))
print ('
- usage_code:' + str(wasd.usage_code()))
print ('
- usage_interpreter:' + str(wasd.usage_interpreter()))
print ('
')
print ('argv
')
print ('')
for arg in sys.argv:
print ('- %s' % html.escape(str(arg)))
print ('
')
del arg
print ('locals
')
print ('')
dct = dict(locals())
for key in dct:
print ('- %s=%s' % (key, html.escape(str(dct[key]))))
print ('
')
del dct
print ('globals
')
print ('')
dct = dict(globals())
for key in dct:
print ('- %s=%s' % (key, html.escape(str(dct[key]))))
print ('
')
del dct
print ('os.environ
')
print ('')
oskeys = os.environ.keys()
sorted(oskeys)
for key in oskeys:
print ('- %s=%s' % (key, html.escape(os.environ[key])))
print ('
')
del oskeys
print ('stat_timer
')
print ('')
print ('- ' + wasd.stat_timer())
print ('
')
print ('')
print ('')
while wasd.cgiplus_begin(True):
CGIorCGIplus()