� m%Yc @ sS d Z d d l Z d d l Z d d l Z d � Z e j e Z e _ d � Z d S( s Debugging utilities.i����Nc C s� t t d � sU t j j � o9 t j j � o9 t j j � sU | t k sU | t k rh t | | | � n6 d d l } d d l } | j | | | � H| j � d S( s� Automatically start the debugger on an exception. See also: - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65287 t ps1i����N( t hasattrt syst stdint isattyt stdoutt stderrt SyntaxErrort KeyboardInterruptt oldexcepthookt tracebackt pdbt print_exceptiont pm( t typet valuet tbR R ( ( sF /projects/68c8b2b8-03ba-44d4-a0d1-5d771c8cb465/code/gprof2dot/debug.pyt excepthook s .c C s t j j t | � d � d S( Ns ( R R t writet repr( t var( ( sF /projects/68c8b2b8-03ba-44d4-a0d1-5d771c8cb465/code/gprof2dot/debug.pyt dump"