#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2009 Doug Hellmann. All rights reserved. # """Show tracebacks with classes """ #end_pymotw_header import cgitb cgitb.enable(format='text') class BrokenClass(object): """This class has an error. """ def __init__(self, a, b): """Be careful passing arguments in here. """ self.a = a self.b = b self.c = self.a * self.b self.d = self.a / self.b return o = BrokenClass(1, 0)