471,330 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

how to print a traceback?

i'm struggling to get some proxy code working with liburl[2] and want
to print
some tracebacks in my class ProxyHTTPConnection::request().
do i have to force an exception and print a backtrace in catch or
can i just print the current stack?
print_tb takes an argument and short of forcing an exception
i don;t know where to get the current backtrace object from.

thanks.

Oct 16 '07 #1
1 5054
En Tue, 16 Oct 2007 01:03:08 -0300, <sn****@gmail.comescribi�:
i'm struggling to get some proxy code working with liburl[2] and want
to print
some tracebacks in my class ProxyHTTPConnection::request().
do i have to force an exception and print a backtrace in catch or
can i just print the current stack?
print_tb takes an argument and short of forcing an exception
i don;t know where to get the current backtrace object from.
from traceback import print_stack
print_stack()
--
Gabriel Genellina

Oct 16 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Rim | last post: by
1 post views Thread by Art | last post: by
4 posts views Thread by anonymousnerd | last post: by
2 posts views Thread by Gary Wessle | last post: by
15 posts views Thread by Jim B. Wilson | last post: by
3 posts views Thread by AWasilenko | last post: by
7 posts views Thread by =?gb2312?B?yMvR1MLkyNXKx8zs0cSjrM37vKvM7NHEsru8+7z | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.