如何在 PyS60 中记录打印语句和错误消息?

发布于 2024-07-16 16:17:02 字数 182 浏览 4 评论 0原文

当在 Python for S60 (PyS60) 中运行基于图形的程序时,错误消息和打印语句的输出(即 stdout)被隐藏。 如果由于错误,应用程序停止按预期工作,则其丢失并且跟踪错误非常困难,有时需要运行代码的“第二个剥离版本”。

这显然是痛苦的。

如何将这些错误记录到文件中,以便以后可以看到它们。

When running graphics based programs in Python for S60 (PyS60) the error messages and the output of the print statement (i.e. stdout) are hidden. If due to an error application stops working as expected its lost and tracking down the bug is very difficult, sometimes require running a "second stripped version" of the code.

This is obviously painful.

How do I log those errors to a file, so that I may see them later.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文