The cgitb module provides a special exception handler for Python scripts.
Questions tagged [cgitb]
7 questions
3
votes
0 answers
How to use cgitb for enhanced traceback logging in a flask app?
When exceptions occur in my Flask app I want to be able to use cgitb for enhanced traceback logging when exceptions occur.
Simply doing
import cgitb
cgitb.enable(format="text")
at the top of the file where the app is initialized is not doing the…

bswiecicki
- 71
- 4
2
votes
1 answer
cgitb continue even after exception
I recently came across cgitb. It's awesome, especially for the kind of thing I was trying to solve.
However, I have a simple requirement :
Is it possible to write out the exception trace on to a file and still continue post that as well. I know how…

qre0ct
- 5,680
- 10
- 50
- 86
1
vote
1 answer
How to get a cgitb traceback inside a try/except block?
Usually it is advised to initialize cgitb at the beginning of a script with the function cgitb.enable().
But how can I do to use cgitb to format a special exception I catched in a try/except block, without registering cgitb as a global exception…

azmeuk
- 4,026
- 3
- 37
- 64
1
vote
2 answers
Getting HTML body with cgitb
I'm using cgitb (python 2.7) to create html documents server end. I have on file that does a bunch of query and then produces html. I'd like to be able to link just the html so if I could print the html to a new file and link that that, it would…

WorruB
- 111
- 1
- 5
0
votes
0 answers
python tkinter button text typewriter effect
so I want to add a typewriter effect to on the button text not that the button activates a function that types a word and also on label text I don't know how I tried some but they are mostly for when you press a button that it types out text I want…

grozan programer
- 27
- 1
- 8
0
votes
1 answer
Remove /r/n in a Python 3 Web Server
I'm working on a game in Python (for fun). However, I've come into a few issues where the game looks for a page to return the string "1", but the actual return is "1\r\n". This fouls my response checking. Is there any way to handle both…
user6021801
0
votes
0 answers
Python + Apache + wsgi - How to turn on the cgitb debug on browser?
How can I turn on the cgitb debug on browser in wsgi?
# enable debugging
import cgitb
cgitb.enable()
def application(environ, start_response):
# build the response body possibly using the environ dictionary
response_body = 'The request method was…

Run
- 54,938
- 169
- 450
- 748