Sorry for the typo :-( Siggy Brentrup <bsb at winnegan.de> writes: > import traceback, cStringIO > > f = cStringIO.StringIO f = cStringIO.StringIO() > traceback.print_exc(None, f) > > write_to_database(f.getvalue()) > > HTH > Siggy