More verbose traceback

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Thomas Guettler

    More verbose traceback

    Hi!

    Has someone written a script which
    dumps a traceback in a more verbose style?

    This should include the information you
    see with cgitb. I like this very much.

    You see the values of the important variables
    in the traceback. I need something like
    this, but it should be plain ascii, not html.

    thomas

  • Michael Hudson

    #2
    Re: More verbose traceback

    "Thomas Guettler" <guettli@thom as-guettler.de> writes:
    [color=blue]
    > Hi!
    >
    > Has someone written a script which
    > dumps a traceback in a more verbose style?
    >
    > This should include the information you
    > see with cgitb. I like this very much.
    >
    > You see the values of the important variables
    > in the traceback. I need something like
    > this, but it should be plain ascii, not html.[/color]

    I beleive there's a patch on SF (to cgitb) that does this.

    Cheers,
    mwh

    --
    But since your post didn't lay out your assumptions, your goals,
    or how you view language characteristics as fitting in with
    either, you're not a *natural* candidate for embracing Design by
    Contract <0.6 wink>. -- Tim Peters, giving Eiffel adoption advice

    Comment

    • Carmine Noviello

      #3
      Re: More verbose traceback

      "Thomas Guettler" <guettli@thom as-guettler.de> wrote in message
      news:pan.2004.0 2.03.12.19.28.7 51005@thomas-guettler.de
      [color=blue]
      > Hi!
      >
      > Has someone written a script which
      > dumps a traceback in a more verbose style?
      >
      > This should include the information you
      > see with cgitb. I like this very much.
      >
      > You see the values of the important variables
      > in the traceback. I need something like
      > this, but it should be plain ascii, not html.
      >
      > thomas[/color]

      Hi,
      I'm working to a tool which collects all informations related to
      a traceback object a saves them in XML format. There is also a
      graphical program you can use to analyze dump files created by this
      tool. It's name is PyCrash and you can find it at



      I hope that it will be useful for you.

      Carmine Noviello


      --
      Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

      Comment

      • Irmen de Jong

        #4
        Re: More verbose traceback

        Thomas Guettler wrote:[color=blue]
        > Hi!
        >
        > Has someone written a script which
        > dumps a traceback in a more verbose style?
        >
        > This should include the information you
        > see with cgitb. I like this very much.
        >
        > You see the values of the important variables
        > in the traceback. I need something like
        > this, but it should be plain ascii, not html.[/color]

        Have a look at the formatTraceback function in the util.py module of Pyro.
        (http://pyro.sourceforge.net) It prints tracebacks like this:

        [IdJ] d:\>python test.py
        --------------------------------------------------
        <exceptions.Zer oDivisionError> RAISED : integer division or modulo by zero
        Extended Stacktrace follows (most recent call last)
        --------------------------------------------------
        File "test.py", line (15), in ?
        Source code:
        funcB("hello")
        File "test.py", line (11), in funcB
        Source code:
        result=funcA(1)
        Local values:
        localB = 'inside B'
        --------------------------------------------------
        File "test.py", line (7), in funcA
        Source code:
        print arg/0
        Local values:
        arg = 1
        localA = 999
        --------------------------------------------------
        <exceptions.Zer oDivisionError> RAISED : integer division or modulo by zero
        --------------------------------------------------


        when used as follows:

        try:
        ...something...
        except:
        print "".join(Pyro.ut il.formatTraceb ack( *sys.exc_info() ))



        HTH,

        --Irmen de Jong.

        Comment

        • Jeremy Fincher

          #5
          Re: More verbose traceback

          Michael Hudson <mwh@python.net > wrote in message news:<m3fzdsbbe o.fsf@pc150.mat hs.bris.ac.uk>. ..[color=blue]
          > I believe there's a patch on SF (to cgitb) that does this.
          >
          > Cheers,
          > mwh[/color]

          I'm pretty sure this was integrated into 2.3; cgitb has a text function, at least.

          Jeremy

          Comment

          • Michael Hudson

            #6
            Re: More verbose traceback

            tweedgeezer@hot mail.com (Jeremy Fincher) writes:
            [color=blue]
            > Michael Hudson <mwh@python.net > wrote in message news:<m3fzdsbbe o.fsf@pc150.mat hs.bris.ac.uk>. ..[color=green]
            > > I believe there's a patch on SF (to cgitb) that does this.
            > >
            > > Cheers,
            > > mwh[/color]
            >
            > I'm pretty sure this was integrated into 2.3; cgitb has a text function, at least.[/color]

            Ah, OK. I recall some discussion about how the patch wasn't really
            The Right Thing(tm), but noone had the time do The Right Thing(tm) and
            whether it should just be checked in anyway but not the outcome.
            Looks like it went in.

            Cheers,
            mwh

            --
            I also fondly recall Paris because that's where I learned to
            debug Zetalisp while drunk. -- Olin Shivers

            Comment

            Working...