cgitb can also produce text tracebacks:

>>> import cgitb
>>> cgitb.enable(format='text')
>>> import urllib
>>> f=urllib.urlopen('bogus://foo')
<type 'exceptions.IOError'>
Python 2.7a1+: /home/amk/source/p/python/python
Thu Jan 28 11:35:04 2010

A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.

 /home/amk/source/p/python/<stdin> in <module>()


 /home/amk/source/p/python/Lib/urllib.py in urlopen(url='bogus://foo', 
data=None, proxies=None)
   85         opener = _urlopener
   86     if data is None:
   87         return opener.open(url)
   88     else:
   89         return opener.open(url, data)
opener = <urllib.FancyURLopener instance at 0x840052c>
opener.open = <bound method FancyURLopener.open of <urllib.FancyURLopener 
instance at 0x840052c>>
url = 'bogus://foo'

    <lots more deleted>

--amk
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to