What follows is the output from cgi.test()
Content-type: text/html

Current Working Directory:

/home/jdearte/1001010.com/pytest

Command Line Arguments:

['cgi.text.py']

Form Contents:

No form fields.

Shell Environment:

DOCUMENT_ROOT
/home/jdearte/1001010.com
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING
x-gzip, gzip, deflate
HTTP_HOST
1001010.com
HTTP_USER_AGENT
CCBot/2.0 (http://commoncrawl.org/faq/)
PATH
/usr/local/bin:/usr/bin:/bin
QUERY_STRING
REMOTE_ADDR
54.196.89.247
REMOTE_PORT
33524
REQUEST_METHOD
GET
REQUEST_URI
/pytest/cgi.text.py
SCRIPT_FILENAME
/home/jdearte/1001010.com/pytest/cgi.text.py
SCRIPT_NAME
/pytest/cgi.text.py
SCRIPT_URI
https://1001010.com/pytest/cgi.text.py
SCRIPT_URL
/pytest/cgi.text.py
SERVER_ADDR
64.111.122.131
SERVER_ADMIN
webmaster@1001010.com
SERVER_NAME
1001010.com
SERVER_PORT
443
SERVER_PROTOCOL
HTTP/1.0
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SSL_TLS_SNI
1001010.com
UNIQUE_ID
WU6d0EBveoMAAE3KMFUAAAAB

These environment variables could have been set:

In addition, HTTP headers sent by the server may be passed in the environment as well. Here are some common variable names:

What follows is a test, not an actual exception:

Traceback (most recent call last):

  File "/usr/lib/python2.7/cgi.py", line 905, in test
    g()
  File "/usr/lib/python2.7/cgi.py", line 903, in g
    f()
  File "/usr/lib/python2.7/cgi.py", line 901, in f
    exec "testing print_exception() -- <I>italics?</I>"
  File "<string>", line 1
    testing print_exception() -- <I>italics?</I>
                          ^
SyntaxError: invalid syntax

Second try with a small maxlen...

Current Working Directory:

/home/jdearte/1001010.com/pytest

Command Line Arguments:

['cgi.text.py']

Form Contents:

No form fields.

Shell Environment:

DOCUMENT_ROOT
/home/jdearte/1001010.com
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING
x-gzip, gzip, deflate
HTTP_HOST
1001010.com
HTTP_USER_AGENT
CCBot/2.0 (http://commoncrawl.org/faq/)
PATH
/usr/local/bin:/usr/bin:/bin
QUERY_STRING
REMOTE_ADDR
54.196.89.247
REMOTE_PORT
33524
REQUEST_METHOD
GET
REQUEST_URI
/pytest/cgi.text.py
SCRIPT_FILENAME
/home/jdearte/1001010.com/pytest/cgi.text.py
SCRIPT_NAME
/pytest/cgi.text.py
SCRIPT_URI
https://1001010.com/pytest/cgi.text.py
SCRIPT_URL
/pytest/cgi.text.py
SERVER_ADDR
64.111.122.131
SERVER_ADMIN
webmaster@1001010.com
SERVER_NAME
1001010.com
SERVER_PORT
443
SERVER_PROTOCOL
HTTP/1.0
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SSL_TLS_SNI
1001010.com
UNIQUE_ID
WU6d0EBveoMAAE3KMFUAAAAB