Skip to content

Instantly share code, notes, and snippets.

View peterbe's full-sized avatar

Peter Bengtsson peterbe

View GitHub Profile
@peterbe
peterbe / newtcbs.py
Created August 5, 2011 08:37 — forked from lonnen/newtcbs.py
newtcbs
#!/usr/bin/python
import sys
import logging
import psycopg2
logger = logging.getLogger("duplicates")
logger.addHandler(logging.StreamHandler(sys.stderr))
from tornado.web
class route(object):
"""
decorates RequestHandlers and builds up a list of routables handlers
Tech Notes (or "What the *@# is really happening here?")
--------------------------------------------------------
Everytime @route('...') is called, we instantiate a new route object which
saves off the passed in URI. Then, since it's a decorator, the function is