Login

Snippets by LorenDavie

Snippet List

Capture Stack Trace Decorator

Put this decorator on any function to capture any exceptions generated within and print to a stack trace. example: @catch def my_func(): # code that may raise an exception here

  • decorator
  • debugging
Read More

Dynamic Backends

This allows various implementations of a common interface to be loaded. Back end modules can be specified in settings.py, and from there be loaded and treated polymorphically by an application.

  • backend
  • dynamic-factory
Read More

LorenDavie has posted 4 snippets.