parameters: (self, file=None)
docstring: Helper to print a traceback from the timed code.
  
          Typical use:
  
              t = Timer(...)       # outside the try/except
              try:
                  t.timeit(...)    # or t.repeat(...)
              except:
                  t.print_exc()
  
          The advantage over the standard traceback is that source lines
          in the compiled template will be displayed.
  
          The optional file argument directs where the traceback is
          sent; it defaults to sys.stderr.
docstring_summary: Helper to print a traceback from the timed code.
docstring_tokens: Helper to print a traceback from the timed code .
function: def print_exc(self, file=None):
          """Helper to print a traceback from the timed code.
  
          Typical use:
  
              t = Timer(...)       # outside the try/except
              try:
                  t.timeit(...)    # or t.repeat(...)
              except:
                  t.print_exc()
  
          The advantage over the standard traceback is that source lines
          in the compiled template will be displayed.
  
          The optional file argument directs where the traceback is
          sent; it defaults to sys.stderr.
          """
          import linecache, traceback
          if self.src is not None:
              linecache.cache[dummy_src_name] = (len(self.src),
                                                 None,
                                                 self.src.split("\n"),
                                                 dummy_src_name)
          # else the source is already stored somewhere else
  
          traceback.print_exc(file=file)
function_tokens: def print_exc ( self , file = None ) : import linecache , traceback if self . src is not None : linecache . cache [ dummy_src_name ] = ( len ( self . src ) , None , self . src . split ( "\n" ) , dummy_src_name ) # else the source is already stored somewhere else traceback . print_exc ( file = file )