catching traceback.print_exc()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Philippe Martin

    #1

    catching traceback.print_exc()

    Hi,

    Is there a way to catch traceback.print _exc() output into a string ?


    Philippe

  • Philippe Martin

    #2
    Re: catching traceback.print _exc()

    oops:

    """
    format_exc( [limit[, file]])
    This is like print_exc(limit ) but returns a string instead of printing to a
    file. New in version 2.4.
    """

    Philippe Martin wrote:
    [color=blue]
    > Hi,
    >
    > Is there a way to catch traceback.print _exc() output into a string ?
    >
    >
    > Philippe[/color]

    Comment

    • Peter Hansen

      #3
      Re: catching traceback.print _exc()

      Philippe Martin wrote:[color=blue]
      > Is there a way to catch traceback.print _exc() output into a string ?[/color]

      Presumably using one of the alternatives, like format_exc(). If that's
      not sufficient, maybe some example code to demonstrate what you really
      want would help.

      -Peter

      Comment

      Working...