[Patches] [ python-Patches-452767 ] enhancements for cgitb

noreply@sourceforge.net noreply@sourceforge.net
Tue, 04 Dec 2001 04:33:53 -0800


Patches item #452767, was opened at 2001-08-18 18:34
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=452767&group_id=5470

Category: Modules
Group: None
>Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Ka-Ping Yee (ping)
Assigned to: Ka-Ping Yee (ping)
Summary: enhancements for cgitb

Initial Comment:
Since the module is short and some code got rearranged, the
patch is longer than the module.

Enhancements:
    - file URL now starts with "file://" (standard) rather than "file:"
    - new optional argument 'context' to enable()
    - repeated variable names don't have their values shown twice
    - dotted attributes are shown; missing attributes handled reasonably
    - highlight the whole logical line even if it has multiple physical lines
    - use nice generator interface to tokenize
    - formatting fixed so that it looks good in lynx, links, and w3m too

Tested under varying conditions:
    - with or withour 'display' turned on
    - with or without 'logdir' specified for saving files
    - pydoc module missing (still prints text traceback)


----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-18 21:54

Message:
Logged In: YES 
user_id=6380

Error in sys.excepthook:
Traceback (most recent call last):
  File "/home/guido/python/dist/src/Lib/cgitb.py", line 158,
in __call__
    self.handle((etype, evalue, etb))
  File "/home/guido/python/dist/src/Lib/cgitb.py", line 166,
in handle
    text, doc = 0, html(info, self.context)
  File "/home/guido/python/dist/src/Lib/cgitb.py", line 99,
in html
    vars = scanvars(reader, frame, locals)
  File "/home/guido/python/dist/src/Lib/cgitb.py", line 52,
in scanvars
    if lasttoken == '.':
UnboundLocalError: local variable 'lasttoken' referenced
before assignment


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=452767&group_id=5470