[FRPythoneers] Printing a traceback

PC Drew drewpc at colorado.edu
Mon Aug 27 10:33:55 MDT 2001


you could create a new StringIO object and store that object in
sys.__stderr__

----- Original Message -----
From: "Ken Kinder" <kkinder at tridog.com>
To: "Front Range Pythoneers" <frpythoneers at lists.community.tummy.com>
Sent: Monday, August 27, 2001 10:27 AM
Subject: [FRPythoneers] Printing a traceback


> If I have a statement like:
>
> try:
> (bad code)
> except:
> typ, val, tb = sys.exc_info()
> ....
>
> How do I put the traceback-like text in a string variable? That is, I
> want the text that would otherwise be printed to sys.stderr if I hadn't
> have caught the error.
>
> --
> Ken Kinder - Engineer
> Par Avance, Inc. / Tridog Interactive, Inc.
> _______________________________________________
> This message sent by the FRPythoneers mailing list.
> Unsubscribe: echo unsubscribe |
FRPythoneers-request at lists.community.tummy.com
> URL: http://lists.community.tummy.com/mailman/listinfo/frpythoneers
>




More information about the FRPythoneers mailing list