try an idea for wx.Exit bug
Trying to add this on windows... don't know if it will work.
moved functions around
Merge branch 'atexit'