This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put the following in your usercustomize.py file. | |
# see https://33ad.org/blog/pycon-2011-and-colorized-pdb-source-listings | |
# for more info and explanation. | |
# colorize pdb source output | |
import pdb | |
import StringIO | |
from pygments import highlight | |
from pygments.lexers import PythonLexer, PythonTracebackLexer | |
from pygments.formatters import TerminalFormatter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaseHandler(RequestHandler): | |
# .... other stuff .... | |
def _handle_request_exception(self, e): | |
RequestHandler._handle_request_exception(self,e) | |
import pdb | |
pdb.post_mortem() | |
def bp(): |
NewerOlder