How do I print out the full traceback in my except call?

Right now, I do this:

try:
    blah
except Exception, e:
    print e
    time.sleep(9999)

Instead of print e, I want to print out the entire traceback. And then sleep it for 999.

Answers


import traceback  
traceback.print_exc()  

Need Your Help

Testing a WCF SOAP service from Xamarin studio

c# web-services wcf soap monotouch

Last week I started with some Xamarin development (I'm running Xamarin Studio on Mac os x).

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.