crash and debug logging
On windows there's the notion of a "Console" app and a none-console app. Console apps always have some terminal window associated with them where the dump stdout. We disable this for KeySync cause most users don't like having that ominous black window staring out at them.
But it would be good if there was some way to capture crashes and debug info, without having to issue a separate build.
One way to do this would be to just redirect stdout and stderr to files like :
sys.stdout = open('/path/stdout.log', 'w') sys.stderr = open('/path/stderr.log', 'w')
And/or we could wrap
ROOT.mainloop() in a
try/except block and catch all unhandled exceptions, print them to a file and then ask the user nicely "KeySync has crashed, do you want to save the crash report?" or something. Thoughts?