1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 from sys import version as python_version
20 import platform
21 import sys
22 import traceback
23 import locale
24
25 import wx
26
27 from timelinelib.meta.version import get_full_version
28 from timelinelib.wxgui.frames.mainframe.mainframe import MainFrame
29 from timelinelib.wxgui.dialogs.feedback.view import show_feedback_dialog
30
31
36
37
39 app = wx.App(False)
40 main_frame = MainFrame(application_arguments)
41 main_frame.Show()
42 sys.excepthook = unhandled_exception_hook
43 if before_main_loop_hook:
44 before_main_loop_hook()
45 app.MainLoop()
46
47
54
55
57 return ("An unexpected error has occurred. Help us fix it by reporting "
58 "the error through this form. ")
59
60
62 return "".join(traceback.format_exception_only(exception_type, value)).strip()
63
64
66 return "\n".join([
67 "Stacktrace:",
68 "",
69 indent(("".join(traceback.format_exception(exception_type, value, tb))).strip()),
70 "",
71 "Environment:",
72 "",
73 indent(create_versions_message()),
74 indent(create_locale_message()),
75 ])
76
77
79 return "\n".join([
80 "Timeline version: %s" % get_full_version(),
81 "System version: %s" % ", ".join(platform.uname()),
82 "Python version: %s" % python_version.replace("\n", ""),
83 "wxPython version: %s" % wx.version(),
84 ])
85
86
88 return "\n".join([
89 "Locale setting: %s" % " ".join(locale.getlocale(locale.LC_TIME)),
90 "Locale sample date: 3333-11-22",
91 ])
92
93
95 return "\n".join(" " + x for x in text.split("\n"))
96