def get_traceback():
 (exc_type, exc_value, exc_tb) = sys.exc_info()
 trace_list = traceback.format_exception(exc_type, exc_value, exc_tb)
 body = u''.join((cstr(t) for t in trace_list))
 return body

def get_traceback ( ) : ( exc_type , exc_value , exc_tb ) = sys . exc_info ( ) trace_list = traceback . format_exception ( exc_type , exc_value , exc_tb ) body = u'' . join ( ( cstr ( t ) for t in trace_list ) ) return body
returns the traceback of the exception .