equal
deleted
inserted
replaced
46 self.buildpath = None |
46 self.buildpath = None |
47 self.splash = None |
47 self.splash = None |
48 self.splashPath = self.Bpath("images", "splash.png") |
48 self.splashPath = self.Bpath("images", "splash.png") |
49 self.modules = ["BeremizIDE"] |
49 self.modules = ["BeremizIDE"] |
50 self.debug = os.path.exists("BEREMIZ_DEBUG") |
50 self.debug = os.path.exists("BEREMIZ_DEBUG") |
|
51 self.handle_exception = None |
51 |
52 |
52 def Bpath(self, *args): |
53 def Bpath(self, *args): |
53 return os.path.join(self.app_dir, *args) |
54 return os.path.join(self.app_dir, *args) |
54 |
55 |
55 def Usage(self): |
56 def Usage(self): |
196 try: |
197 try: |
197 self.BackgroundInitialization() |
198 self.BackgroundInitialization() |
198 self.CreateUI() |
199 self.CreateUI() |
199 self.CloseSplash() |
200 self.CloseSplash() |
200 self.ShowUI() |
201 self.ShowUI() |
201 # except (KeyboardInterrupt, SystemExit): |
202 except (KeyboardInterrupt, SystemExit): |
202 # raise |
203 raise |
203 except Exception: |
204 except Exception: |
204 self.handle_exception(*sys.exc_info(), exit=True) |
205 if self.handle_exception is not None: |
|
206 self.handle_exception(*sys.exc_info(), exit=True) |
|
207 else: |
|
208 raise |
205 |
209 |
206 def MainLoop(self): |
210 def MainLoop(self): |
207 self.app.MainLoop() |
211 self.app.MainLoop() |
208 |
212 |
209 def Start(self): |
213 def Start(self): |