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
24 import wx
25
26 from timelinelib.meta.version import get_full_version
27 from timelinelib.wxgui.frames.mainframe.mainframe import MainFrame
28 from timelinelib.wxgui.dialogs.feedback.view import show_feedback_dialog
29
30
35
36
38 app = wx.App(False)
39 main_frame = MainFrame(application_arguments)
40 main_frame.Show()
41 sys.excepthook = unhandled_exception_hook
42 if before_main_loop_hook:
43 before_main_loop_hook()
44 app.MainLoop()
45
46
53
54
56 return ("An unexpected error has occurred. Help us fix it by reporting "
57 "the error through this form. ")
58
59
61 return "".join(traceback.format_exception_only(exception_type, value)).strip()
62
63
65 return "\n".join([
66 "Stacktrace:",
67 "",
68 indent(("".join(traceback.format_exception(exception_type, value, tb))).strip()),
69 "",
70 "Environment:",
71 "",
72 indent(create_versions_message()),
73 indent(create_locale_message()),
74 ])
75
76
78 return "\n".join([
79 "Timeline version: %s" % get_full_version(),
80 "System version: %s" % ", ".join(platform.uname()),
81 "Python version: %s" % python_version.replace("\n", ""),
82 "wxPython version: %s" % wx.version(),
83 ])
84
85
87 loc = wx.Locale()
88 language_name = loc.GetLanguageName(loc.GetSystemLanguage())
89 encoding_name = loc.GetSystemEncodingName()
90 locale_info = '%s %s' % (language_name, encoding_name)
91 return "\n".join([
92 "Locale setting: %s" % locale_info,
93 "Locale sample date: 3333-11-22",
94 ])
95
96
98 return "\n".join(" " + x for x in text.split("\n"))
99