54 |
self.create_session() |
self.create_session() |
55 |
return true |
return true |
56 |
|
|
57 |
|
def OnExit(self): |
58 |
|
"""Clean up code. |
59 |
|
|
60 |
|
Extend this in derived classes if needed. |
61 |
|
""" |
62 |
|
self.session.Destroy() |
63 |
|
self.interactor.Destroy() |
64 |
|
Publisher.Destroy(self) |
65 |
|
|
66 |
|
def MainLoop(self): |
67 |
|
"""Call the inherited MainLoop method and then call OnExit. |
68 |
|
|
69 |
|
In wxPython OnExit isn't called automatically, unfortunately, so |
70 |
|
we do it here. |
71 |
|
""" |
72 |
|
wxApp.MainLoop(self) |
73 |
|
self.OnExit() |
74 |
|
|
75 |
def read_startup_files(self): |
def read_startup_files(self): |
76 |
"""Read the startup files.""" |
"""Read the startup files.""" |
77 |
# for now the startup file is ~/.thuban/thubanstart.py |
# for now the startup file is ~/.thuban/thubanstart.py |