views:

183

answers:

2

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.

A: 

Duplicate. http://stackoverflow.com/questions/616645/how-do-i-duplicate-sys-stdout-to-a-log-file-in-python.

See John T's answer, especially.

Brian
I asked specifically about PyS60.
Xolve
+2  A: 

PyS60 specific info here: http://wiki.forum.nokia.com/index.php/Python_debugging_techniques

JOM