In ruby, I've used the gem exception_notification

This will send me an email about the detailed exception information.

What's an alternative for Python?

  • 1
    What version of Python are you using? Do you need to get the information in an email only, or does it need to be able to community with other services?
    – user46
    Commented Sep 14, 2015 at 2:40

2 Answers 2


The standard library logging module. Use logging.handlers.SMTPHandler for email. It works in 2 and 3.


  • Seems more like a Google question though.
    – user193661
    Commented Sep 14, 2015 at 4:55

In addition to the standard logging library you might like to consider using CrashReporter.

Example, from the documentation:

from crashreporter import CrashReporter

# Some code here that actually implements your application

if __name__ == '__main__':
    # Note I have used a configuration file for setting up SMTP and FTP accounts but you can also call functions
    # cr.setup_smtp() and cr.setup_ftp() with your credentials to configure SMTP/FTP respectively.
    cr = CrashReporter(report_dir='/home/calvin/crashreporter',

    cr.application_name = 'My App'
    cr.application_version = '1.1.350'

    # Crash reporter set up go ahead and run your app.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.