The cgitb module provides a special exception handler for Python
scripts. (Its name is a bit misleading. It was originally designed to
display extensive traceback information in HTML for CGI scripts. It
was later generalized to also display this information in plain text.)
After this module is activated, if an uncaught exception occurs, a
detailed, formatted report will be displayed. The report includes a
traceback showing excerpts of the source code for each level, as well
as the values of the arguments and local variables to currently
running functions, to help you debug the problem. Optionally, you can
save this information to a file instead of sending it to the browser.
因为我找不到任何现有的库,所以我写了Pymo。它的功能与Krumo非常相似,将任何Python变量呈现为html,可以将其打印或保存到文件中,以便在web浏览器中查看,并使用javascript和CSS使其可读。在
请看一看,并提交错误报告或功能请求,如果它帮助你。在
也许cgitb就是你想要的:
相关问题 更多 >
编程相关推荐