Issue569574
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2002-06-16 04:46 by skip.montanaro, last changed 2022-04-10 16:05 by admin. This issue is now closed.
Files | ||||
---|---|---|---|---|
File name | Uploaded | Description | Edit | |
cgitb.diff | skip.montanaro, 2002-06-16 05:09 |
Messages (10) | |||
---|---|---|---|
msg40321 - (view) | Author: Skip Montanaro (skip.montanaro) * ![]() |
Date: 2002-06-16 04:46 | |
Here's a patch to cgitb that allows you to enable plain text output. It adds an extra variable to the cgitb.enable function and corresponding underlying functions. To get plain text invoke it as import cgitb cgitb.enable(format="text") (actually, any value for format other than "html" will enable plain text output). The default value is "html", so existing usage of cgitb should be unaffected. I realize this isn't quite what you suggested, but it seemed to me worthwhile to keep such similar code together. I'm not entirely certain I haven't fouled up the html formatting. It needs to be checked still. Also still to come is a doc change. Skip |
|||
msg40322 - (view) | Author: Skip Montanaro (skip.montanaro) * ![]() |
Date: 2002-06-16 05:09 | |
Logged In: YES user_id=44345 Okay, here's a correction to the first patch. It fixes the logic bug that corrupted the HTML output. It also adds a little bit of extra documentation. Writing the documentation made me think that perhaps this should be added to the traceback module as Guido suggested with just a stub cgitb module that provides an enable function that calls the enable function in the traceback module with format="html". The cgitb module could then be deprecated. |
|||
msg40323 - (view) | Author: Guido van Rossum (gvanrossum) * ![]() |
Date: 2002-06-20 03:36 | |
Logged In: YES user_id=6380 Unassigning -- I won't get to this before my vacation. |
|||
msg40324 - (view) | Author: Skip Montanaro (skip.montanaro) * ![]() |
Date: 2002-07-09 23:48 | |
Logged In: YES user_id=44345 Ping How about you? As the author I think you're in the best position to decide on the merits of the patch... Skip |
|||
msg40325 - (view) | Author: Ka-Ping Yee (ping) * ![]() |
Date: 2002-07-10 03:33 | |
Logged In: YES user_id=45338 I think enhanced text tracebacks would be great. (I even have my own hacked-up one lying around here somewhere -- it colourized the output. I think a part of me was waiting for an opportunity to make enhanced tracebacks standard. The most important enhancement IMHO is to show argument values.) I don't think the functionality belongs in cgitb, though. The main routine probably should go in traceback; the common routines (scanvars and lookup) can go there too. |
|||
msg40326 - (view) | Author: Skip Montanaro (skip.montanaro) * ![]() |
Date: 2002-08-02 17:45 | |
Logged In: YES user_id=44345 I started messing around with this, but quickly figured out I didn't know what "main routine" belongs in traceback. Moving lookup and scanvars there is no problem, but the rest of the functionality is almost entirely in the html() and text() routines. Do you mean they should go in traceback? |
|||
msg40327 - (view) | Author: Hunter Peress (hfastedge) | Date: 2003-06-16 17:58 | |
Logged In: YES user_id=479934 http://mail.python.org/pipermail/python-dev/2003-June/036230.html the need for this is clear and longstanding. I filed a bug about this https://sourceforge.net/tracker/?group_id=5470&atid=105470 please remove it as i never found this bug im writing on before now I even later wrote the patch for myself. im sure ping's patch is better. I use this patch every day because it simply is flat out better than python's current error mechanism. |
|||
msg40328 - (view) | Author: Hunter Peress (hfastedge) | Date: 2003-06-16 18:00 | |
Logged In: YES user_id=479934 proper location to my bug https://sourceforge.net/tracker/?func=detail&aid=654558&group_id=5470&atid=105470 |
|||
msg40329 - (view) | Author: Skip Montanaro (skip.montanaro) * ![]() |
Date: 2003-06-16 18:36 | |
Logged In: YES user_id=44345 Okay, I closed 654558 as a duplicate of this one. |
|||
msg40330 - (view) | Author: Skip Montanaro (skip.montanaro) * ![]() |
Date: 2003-06-17 12:59 | |
Logged In: YES user_id=44345 checked in as * cgitb.py 1.8 * Doc/lib/libcgitb.tex 1.4 * Misc/News 1.788 |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-10 16:05:25 | admin | set | github: 36754 |
2002-06-16 04:46:55 | skip.montanaro | create |