It depends on your Python web framework settings.
For example, Pyramid framework has various setting for enabling traceback in web browser and start an interactive debugging session:
http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/narr/introduction.html#debugging-settings
It all depends on how your Python web application is wired up and what architecture it uses and so on. Please include full context information in the question for further help.
More information about debugging web applications with Python and WSGI:
http://code.google.com/p/modwsgi/wiki/DebuggingTechniques
If you are not using any framework you need to put everything inside a main level try...except block as Python standard library does not provide tools to convert exceptions to HTML.
import traceback
try:
...
except Exception as e:
# Set content type as text/plain (don't know how)
traceback.print_exc(e) # Print out exception as plain text